Text Generation
Transformers
PyTorch
Safetensors
English
t5
text2text-generation
text-generation-inference
Instructions to use Ateeqq/keywords-title-generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ateeqq/keywords-title-generator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ateeqq/keywords-title-generator")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Ateeqq/keywords-title-generator") model = AutoModelForSeq2SeqLM.from_pretrained("Ateeqq/keywords-title-generator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ateeqq/keywords-title-generator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ateeqq/keywords-title-generator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ateeqq/keywords-title-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ateeqq/keywords-title-generator
- SGLang
How to use Ateeqq/keywords-title-generator 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 "Ateeqq/keywords-title-generator" \ --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": "Ateeqq/keywords-title-generator", "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 "Ateeqq/keywords-title-generator" \ --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": "Ateeqq/keywords-title-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ateeqq/keywords-title-generator with Docker Model Runner:
docker model run hf.co/Ateeqq/keywords-title-generator
Upload 6 files
Browse files- config.json +57 -57
- pytorch_model.bin +1 -1
config.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_name_or_path": "t5-base",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"T5ForConditionalGeneration"
|
| 5 |
-
],
|
| 6 |
-
"d_ff": 3072,
|
| 7 |
-
"d_kv": 64,
|
| 8 |
-
"d_model": 768,
|
| 9 |
-
"decoder_start_token_id": 0,
|
| 10 |
-
"dropout_rate": 0.1,
|
| 11 |
-
"eos_token_id": 1,
|
| 12 |
-
"feed_forward_proj": "relu",
|
| 13 |
-
"initializer_factor": 1.0,
|
| 14 |
-
"is_encoder_decoder": true,
|
| 15 |
-
"layer_norm_epsilon": 1e-06,
|
| 16 |
-
"model_type": "t5",
|
| 17 |
-
"n_positions": 512,
|
| 18 |
-
"num_decoder_layers": 12,
|
| 19 |
-
"num_heads": 12,
|
| 20 |
-
"num_layers": 12,
|
| 21 |
-
"output_past": true,
|
| 22 |
-
"pad_token_id": 0,
|
| 23 |
-
"relative_attention_num_buckets": 32,
|
| 24 |
-
"task_specific_params": {
|
| 25 |
-
"summarization": {
|
| 26 |
-
"early_stopping": true,
|
| 27 |
-
"length_penalty": 2.0,
|
| 28 |
-
"max_length": 200,
|
| 29 |
-
"min_length": 30,
|
| 30 |
-
"no_repeat_ngram_size": 3,
|
| 31 |
-
"num_beams": 4,
|
| 32 |
-
"prefix": "summarize: "
|
| 33 |
-
},
|
| 34 |
-
"translation_en_to_de": {
|
| 35 |
-
"early_stopping": true,
|
| 36 |
-
"max_length": 300,
|
| 37 |
-
"num_beams": 4,
|
| 38 |
-
"prefix": "translate English to German: "
|
| 39 |
-
},
|
| 40 |
-
"translation_en_to_fr": {
|
| 41 |
-
"early_stopping": true,
|
| 42 |
-
"max_length": 300,
|
| 43 |
-
"num_beams": 4,
|
| 44 |
-
"prefix": "translate English to French: "
|
| 45 |
-
},
|
| 46 |
-
"translation_en_to_ro": {
|
| 47 |
-
"early_stopping": true,
|
| 48 |
-
"max_length": 300,
|
| 49 |
-
"num_beams": 4,
|
| 50 |
-
"prefix": "translate English to Romanian: "
|
| 51 |
-
}
|
| 52 |
-
},
|
| 53 |
-
"torch_dtype": "float32",
|
| 54 |
-
"transformers_version": "4.16.2",
|
| 55 |
-
"use_cache": true,
|
| 56 |
-
"vocab_size": 32128
|
| 57 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "t5-base",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"T5ForConditionalGeneration"
|
| 5 |
+
],
|
| 6 |
+
"d_ff": 3072,
|
| 7 |
+
"d_kv": 64,
|
| 8 |
+
"d_model": 768,
|
| 9 |
+
"decoder_start_token_id": 0,
|
| 10 |
+
"dropout_rate": 0.1,
|
| 11 |
+
"eos_token_id": 1,
|
| 12 |
+
"feed_forward_proj": "relu",
|
| 13 |
+
"initializer_factor": 1.0,
|
| 14 |
+
"is_encoder_decoder": true,
|
| 15 |
+
"layer_norm_epsilon": 1e-06,
|
| 16 |
+
"model_type": "t5",
|
| 17 |
+
"n_positions": 512,
|
| 18 |
+
"num_decoder_layers": 12,
|
| 19 |
+
"num_heads": 12,
|
| 20 |
+
"num_layers": 12,
|
| 21 |
+
"output_past": true,
|
| 22 |
+
"pad_token_id": 0,
|
| 23 |
+
"relative_attention_num_buckets": 32,
|
| 24 |
+
"task_specific_params": {
|
| 25 |
+
"summarization": {
|
| 26 |
+
"early_stopping": true,
|
| 27 |
+
"length_penalty": 2.0,
|
| 28 |
+
"max_length": 200,
|
| 29 |
+
"min_length": 30,
|
| 30 |
+
"no_repeat_ngram_size": 3,
|
| 31 |
+
"num_beams": 4,
|
| 32 |
+
"prefix": "summarize: "
|
| 33 |
+
},
|
| 34 |
+
"translation_en_to_de": {
|
| 35 |
+
"early_stopping": true,
|
| 36 |
+
"max_length": 300,
|
| 37 |
+
"num_beams": 4,
|
| 38 |
+
"prefix": "translate English to German: "
|
| 39 |
+
},
|
| 40 |
+
"translation_en_to_fr": {
|
| 41 |
+
"early_stopping": true,
|
| 42 |
+
"max_length": 300,
|
| 43 |
+
"num_beams": 4,
|
| 44 |
+
"prefix": "translate English to French: "
|
| 45 |
+
},
|
| 46 |
+
"translation_en_to_ro": {
|
| 47 |
+
"early_stopping": true,
|
| 48 |
+
"max_length": 300,
|
| 49 |
+
"num_beams": 4,
|
| 50 |
+
"prefix": "translate English to Romanian: "
|
| 51 |
+
}
|
| 52 |
+
},
|
| 53 |
+
"torch_dtype": "float32",
|
| 54 |
+
"transformers_version": "4.16.2",
|
| 55 |
+
"use_cache": true,
|
| 56 |
+
"vocab_size": 32128
|
| 57 |
+
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 891733454
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1337d62f8bda9360dd24b1638eb0c3564da68cd45859b9d904dee53f61d39f5
|
| 3 |
size 891733454
|