Text Generation
Transformers
ONNX
Safetensors
English
t5
text2text-generation
phonetics
ipa
byt5
seq2seq
text-generation-inference
Instructions to use pymlex/ipa-transcriptor-300M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pymlex/ipa-transcriptor-300M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pymlex/ipa-transcriptor-300M")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("pymlex/ipa-transcriptor-300M") model = AutoModelForSeq2SeqLM.from_pretrained("pymlex/ipa-transcriptor-300M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pymlex/ipa-transcriptor-300M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pymlex/ipa-transcriptor-300M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pymlex/ipa-transcriptor-300M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pymlex/ipa-transcriptor-300M
- SGLang
How to use pymlex/ipa-transcriptor-300M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "pymlex/ipa-transcriptor-300M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pymlex/ipa-transcriptor-300M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "pymlex/ipa-transcriptor-300M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pymlex/ipa-transcriptor-300M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use pymlex/ipa-transcriptor-300M with Docker Model Runner:
docker model run hf.co/pymlex/ipa-transcriptor-300M
Adding ONNX file of this model
#1
by realenv - opened
- README.md +1 -0
- onnx/config.json +34 -0
- onnx/decoder_model.onnx +3 -0
- onnx/encoder_model.onnx +3 -0
- onnx/generation_config.json +9 -0
README.md
CHANGED
|
@@ -6,6 +6,7 @@ tags:
|
|
| 6 |
- ipa
|
| 7 |
- byt5
|
| 8 |
- seq2seq
|
|
|
|
| 9 |
pipeline_tag: text-generation
|
| 10 |
base_model: google/byt5-small
|
| 11 |
language:
|
|
|
|
| 6 |
- ipa
|
| 7 |
- byt5
|
| 8 |
- seq2seq
|
| 9 |
+
- onnx
|
| 10 |
pipeline_tag: text-generation
|
| 11 |
base_model: google/byt5-small
|
| 12 |
language:
|
onnx/config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"T5ForConditionalGeneration"
|
| 5 |
+
],
|
| 6 |
+
"classifier_dropout": 0.0,
|
| 7 |
+
"d_ff": 3584,
|
| 8 |
+
"d_kv": 64,
|
| 9 |
+
"d_model": 1472,
|
| 10 |
+
"decoder_start_token_id": 0,
|
| 11 |
+
"dense_act_fn": "gelu_new",
|
| 12 |
+
"dropout_rate": 0.1,
|
| 13 |
+
"dtype": "float32",
|
| 14 |
+
"eos_token_id": 1,
|
| 15 |
+
"feed_forward_proj": "gated-gelu",
|
| 16 |
+
"gradient_checkpointing": false,
|
| 17 |
+
"initializer_factor": 1.0,
|
| 18 |
+
"is_encoder_decoder": true,
|
| 19 |
+
"is_gated_act": true,
|
| 20 |
+
"layer_norm_epsilon": 1e-06,
|
| 21 |
+
"model_type": "t5",
|
| 22 |
+
"num_decoder_layers": 4,
|
| 23 |
+
"num_heads": 6,
|
| 24 |
+
"num_layers": 12,
|
| 25 |
+
"pad_token_id": 0,
|
| 26 |
+
"relative_attention_max_distance": 128,
|
| 27 |
+
"relative_attention_num_buckets": 32,
|
| 28 |
+
"scale_decoder_outputs": true,
|
| 29 |
+
"tokenizer_class": "ByT5Tokenizer",
|
| 30 |
+
"torch_dtype": "float32",
|
| 31 |
+
"transformers_version": "4.51.3",
|
| 32 |
+
"use_cache": false,
|
| 33 |
+
"vocab_size": 384
|
| 34 |
+
}
|
onnx/decoder_model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e48be3e0a0f7721d8c5337816a30db25f898a582f29fbddde795bec7e6745cfd
|
| 3 |
+
size 330330004
|
onnx/encoder_model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29f2756076efdd5c6e7a6dff8f4c3ea42436596b75307d074d7fde17f23a45c3
|
| 3 |
+
size 870817500
|
onnx/generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"decoder_start_token_id": 0,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
1
|
| 6 |
+
],
|
| 7 |
+
"pad_token_id": 0,
|
| 8 |
+
"transformers_version": "4.51.3"
|
| 9 |
+
}
|