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
Upload 8 files
Browse files- config.json +2 -2
- generation_config.json +1 -1
- model.safetensors +2 -2
- spiece.model +2 -2
- tokenizer.json +6 -1
- tokenizer_config.json +2 -2
config.json
CHANGED
|
@@ -57,7 +57,7 @@
|
|
| 57 |
}
|
| 58 |
},
|
| 59 |
"tie_word_embeddings": true,
|
| 60 |
-
"transformers_version": "5.
|
| 61 |
"use_cache": false,
|
| 62 |
-
"vocab_size":
|
| 63 |
}
|
|
|
|
| 57 |
}
|
| 58 |
},
|
| 59 |
"tie_word_embeddings": true,
|
| 60 |
+
"transformers_version": "5.1.0",
|
| 61 |
"use_cache": false,
|
| 62 |
+
"vocab_size": 32128
|
| 63 |
}
|
generation_config.json
CHANGED
|
@@ -4,5 +4,5 @@
|
|
| 4 |
1
|
| 5 |
],
|
| 6 |
"pad_token_id": 0,
|
| 7 |
-
"transformers_version": "5.
|
| 8 |
}
|
|
|
|
| 4 |
1
|
| 5 |
],
|
| 6 |
"pad_token_id": 0,
|
| 7 |
+
"transformers_version": "5.1.0"
|
| 8 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9674393a44d57288d9ef05137e75ae400130e646c38410158e7778152a58cf14
|
| 3 |
+
size 134
|
spiece.model
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:494e3f78adee7d47cd481574567a67f49e77a88ee4ecf720909e0c8834cb200d
|
| 3 |
+
size 131
|
tokenizer.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": {
|
| 4 |
+
"direction": "Left",
|
| 5 |
+
"max_length": 128,
|
| 6 |
+
"strategy": "LongestFirst",
|
| 7 |
+
"stride": 0
|
| 8 |
+
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
tokenizer_config.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
"clean_up_tokenization_spaces": false,
|
| 5 |
"eos_token": "</s>",
|
| 6 |
"extra_ids": 100,
|
| 7 |
-
"
|
| 8 |
"<extra_id_0>",
|
| 9 |
"<extra_id_1>",
|
| 10 |
"<extra_id_2>",
|
|
@@ -116,4 +116,4 @@
|
|
| 116 |
"truncation_side": "left",
|
| 117 |
"truncation_strategy": "longest_first",
|
| 118 |
"unk_token": "<unk>"
|
| 119 |
-
}
|
|
|
|
| 4 |
"clean_up_tokenization_spaces": false,
|
| 5 |
"eos_token": "</s>",
|
| 6 |
"extra_ids": 100,
|
| 7 |
+
"additional_special_tokens": [
|
| 8 |
"<extra_id_0>",
|
| 9 |
"<extra_id_1>",
|
| 10 |
"<extra_id_2>",
|
|
|
|
| 116 |
"truncation_side": "left",
|
| 117 |
"truncation_strategy": "longest_first",
|
| 118 |
"unk_token": "<unk>"
|
| 119 |
+
}
|