Instructions to use knowledgator/flan-t5-large-for-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use knowledgator/flan-t5-large-for-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="knowledgator/flan-t5-large-for-classification")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("knowledgator/flan-t5-large-for-classification") model = AutoModelForSeq2SeqLM.from_pretrained("knowledgator/flan-t5-large-for-classification") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use knowledgator/flan-t5-large-for-classification with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "knowledgator/flan-t5-large-for-classification" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "knowledgator/flan-t5-large-for-classification", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/knowledgator/flan-t5-large-for-classification
- SGLang
How to use knowledgator/flan-t5-large-for-classification 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 "knowledgator/flan-t5-large-for-classification" \ --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": "knowledgator/flan-t5-large-for-classification", "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 "knowledgator/flan-t5-large-for-classification" \ --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": "knowledgator/flan-t5-large-for-classification", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use knowledgator/flan-t5-large-for-classification with Docker Model Runner:
docker model run hf.co/knowledgator/flan-t5-large-for-classification
Upload folder using huggingface_hub
Browse files- pytorch_model.bin +1 -1
- trainer_state.json +7 -19
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3132793669
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e0f1982a7b425aa303b427260e470b7070e72d1bfd4951aeeaa48211fb5ef16
|
| 3 |
size 3132793669
|
trainer_state.json
CHANGED
|
@@ -1,37 +1,25 @@
|
|
| 1 |
{
|
| 2 |
"best_metric": null,
|
| 3 |
"best_model_checkpoint": null,
|
| 4 |
-
"epoch":
|
| 5 |
"eval_steps": 500,
|
| 6 |
-
"global_step":
|
| 7 |
"is_hyper_param_search": false,
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
| 10 |
"log_history": [
|
| 11 |
{
|
| 12 |
-
"epoch": 0.
|
| 13 |
-
"learning_rate":
|
| 14 |
-
"loss": 2.
|
| 15 |
"step": 500
|
| 16 |
-
},
|
| 17 |
-
{
|
| 18 |
-
"epoch": 0.67,
|
| 19 |
-
"learning_rate": 3.3333333333333333e-06,
|
| 20 |
-
"loss": 1.8615,
|
| 21 |
-
"step": 1000
|
| 22 |
-
},
|
| 23 |
-
{
|
| 24 |
-
"epoch": 1.0,
|
| 25 |
-
"learning_rate": 0.0,
|
| 26 |
-
"loss": 1.7412,
|
| 27 |
-
"step": 1500
|
| 28 |
}
|
| 29 |
],
|
| 30 |
"logging_steps": 500,
|
| 31 |
-
"max_steps":
|
| 32 |
"num_train_epochs": 1,
|
| 33 |
"save_steps": 300,
|
| 34 |
-
"total_flos":
|
| 35 |
"trial_name": null,
|
| 36 |
"trial_params": null
|
| 37 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"best_metric": null,
|
| 3 |
"best_model_checkpoint": null,
|
| 4 |
+
"epoch": 0.8,
|
| 5 |
"eval_steps": 500,
|
| 6 |
+
"global_step": 900,
|
| 7 |
"is_hyper_param_search": false,
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
| 10 |
"log_history": [
|
| 11 |
{
|
| 12 |
+
"epoch": 0.44,
|
| 13 |
+
"learning_rate": 2.7777777777777783e-06,
|
| 14 |
+
"loss": 2.5756,
|
| 15 |
"step": 500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
],
|
| 18 |
"logging_steps": 500,
|
| 19 |
+
"max_steps": 1125,
|
| 20 |
"num_train_epochs": 1,
|
| 21 |
"save_steps": 300,
|
| 22 |
+
"total_flos": 1.3775814114213888e+16,
|
| 23 |
"trial_name": null,
|
| 24 |
"trial_params": null
|
| 25 |
}
|