Text Generation
Transformers
Safetensors
English
t5
text2text-generation
seq2seq
flan-t5
lightweight
grounded-qa
text-generation-inference
Instructions to use teapotai/tinyteapot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use teapotai/tinyteapot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="teapotai/tinyteapot")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("teapotai/tinyteapot") model = AutoModelForSeq2SeqLM.from_pretrained("teapotai/tinyteapot") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use teapotai/tinyteapot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "teapotai/tinyteapot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teapotai/tinyteapot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/teapotai/tinyteapot
- SGLang
How to use teapotai/tinyteapot 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 "teapotai/tinyteapot" \ --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": "teapotai/tinyteapot", "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 "teapotai/tinyteapot" \ --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": "teapotai/tinyteapot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use teapotai/tinyteapot with Docker Model Runner:
docker model run hf.co/teapotai/tinyteapot
Adding ONNX file of this model
#1
by zakerytclarke - opened
- README.md +2 -0
- onnx/config.json +63 -0
- onnx/decoder_model.onnx +3 -0
- onnx/encoder_model.onnx +3 -0
- onnx/generation_config.json +8 -0
README.md
CHANGED
|
@@ -4,6 +4,8 @@ datasets:
|
|
| 4 |
- HuggingFaceFW/fineweb-edu
|
| 5 |
language:
|
| 6 |
- en
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
|
|
|
|
| 4 |
- HuggingFaceFW/fineweb-edu
|
| 5 |
language:
|
| 6 |
- en
|
| 7 |
+
tags:
|
| 8 |
+
- onnx
|
| 9 |
---
|
| 10 |
|
| 11 |
|
onnx/config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"T5ForConditionalGeneration"
|
| 5 |
+
],
|
| 6 |
+
"classifier_dropout": 0.0,
|
| 7 |
+
"d_ff": 1024,
|
| 8 |
+
"d_kv": 64,
|
| 9 |
+
"d_model": 512,
|
| 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 |
+
"initializer_factor": 1.0,
|
| 17 |
+
"is_encoder_decoder": true,
|
| 18 |
+
"is_gated_act": true,
|
| 19 |
+
"layer_norm_epsilon": 1e-06,
|
| 20 |
+
"model_type": "t5",
|
| 21 |
+
"n_positions": 512,
|
| 22 |
+
"num_decoder_layers": 8,
|
| 23 |
+
"num_heads": 6,
|
| 24 |
+
"num_layers": 8,
|
| 25 |
+
"output_past": true,
|
| 26 |
+
"pad_token_id": 0,
|
| 27 |
+
"relative_attention_max_distance": 128,
|
| 28 |
+
"relative_attention_num_buckets": 32,
|
| 29 |
+
"scale_decoder_outputs": false,
|
| 30 |
+
"task_specific_params": {
|
| 31 |
+
"summarization": {
|
| 32 |
+
"early_stopping": true,
|
| 33 |
+
"length_penalty": 2.0,
|
| 34 |
+
"max_length": 200,
|
| 35 |
+
"min_length": 30,
|
| 36 |
+
"no_repeat_ngram_size": 3,
|
| 37 |
+
"num_beams": 4,
|
| 38 |
+
"prefix": "summarize: "
|
| 39 |
+
},
|
| 40 |
+
"translation_en_to_de": {
|
| 41 |
+
"early_stopping": true,
|
| 42 |
+
"max_length": 300,
|
| 43 |
+
"num_beams": 4,
|
| 44 |
+
"prefix": "translate English to German: "
|
| 45 |
+
},
|
| 46 |
+
"translation_en_to_fr": {
|
| 47 |
+
"early_stopping": true,
|
| 48 |
+
"max_length": 300,
|
| 49 |
+
"num_beams": 4,
|
| 50 |
+
"prefix": "translate English to French: "
|
| 51 |
+
},
|
| 52 |
+
"translation_en_to_ro": {
|
| 53 |
+
"early_stopping": true,
|
| 54 |
+
"max_length": 300,
|
| 55 |
+
"num_beams": 4,
|
| 56 |
+
"prefix": "translate English to Romanian: "
|
| 57 |
+
}
|
| 58 |
+
},
|
| 59 |
+
"torch_dtype": "float32",
|
| 60 |
+
"transformers_version": "4.51.3",
|
| 61 |
+
"use_cache": false,
|
| 62 |
+
"vocab_size": 32128
|
| 63 |
+
}
|
onnx/decoder_model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:83bad1203e8b1f194f4f874f42899ac69ccbb86ecd0ccbf9e9dcd7b6fe09a5a4
|
| 3 |
+
size 232569095
|
onnx/encoder_model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59faa7a11e6b2d26b16109a0b92c269c026e53348838d48376b218355bfce48e
|
| 3 |
+
size 141460467
|
onnx/generation_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decoder_start_token_id": 0,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
1
|
| 5 |
+
],
|
| 6 |
+
"pad_token_id": 0,
|
| 7 |
+
"transformers_version": "4.51.3"
|
| 8 |
+
}
|