Text Generation
Transformers
PyTorch
Russian
mt5
text2text-generation
question answering
Eval Results (legacy)
Instructions to use vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa") model = AutoModelForSeq2SeqLM.from_pretrained("vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa
- SGLang
How to use vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa 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 "vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa" \ --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": "vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa", "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 "vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa" \ --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": "vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa with Docker Model Runner:
docker model run hf.co/vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qa
Upload MT5ForConditionalGeneration
Browse files- config.json +1 -1
- generation_config.json +1 -1
- pytorch_model.bin +1 -1
config.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
| 26 |
"tie_word_embeddings": false,
|
| 27 |
"tokenizer_class": "T5Tokenizer",
|
| 28 |
"torch_dtype": "float32",
|
| 29 |
-
"transformers_version": "4.
|
| 30 |
"use_cache": true,
|
| 31 |
"vocab_size": 60002,
|
| 32 |
"vocabtrimmer": {
|
|
|
|
| 26 |
"tie_word_embeddings": false,
|
| 27 |
"tokenizer_class": "T5Tokenizer",
|
| 28 |
"torch_dtype": "float32",
|
| 29 |
+
"transformers_version": "4.27.2",
|
| 30 |
"use_cache": true,
|
| 31 |
"vocab_size": 60002,
|
| 32 |
"vocabtrimmer": {
|
generation_config.json
CHANGED
|
@@ -3,5 +3,5 @@
|
|
| 3 |
"decoder_start_token_id": 0,
|
| 4 |
"eos_token_id": 1,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
-
"transformers_version": "4.
|
| 7 |
}
|
|
|
|
| 3 |
"decoder_start_token_id": 0,
|
| 4 |
"eos_token_id": 1,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.27.2"
|
| 7 |
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 422081925
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f1af285709fe51e6ba3a6695c80dc5ef9955ca04f6fd64d5d4716b3c800deeed
|
| 3 |
size 422081925
|