Instructions to use quyanh/pythia-2.8b-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use quyanh/pythia-2.8b-sft with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-2.8b") model = PeftModel.from_pretrained(base_model, "quyanh/pythia-2.8b-sft") - Transformers
How to use quyanh/pythia-2.8b-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="quyanh/pythia-2.8b-sft")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("quyanh/pythia-2.8b-sft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use quyanh/pythia-2.8b-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "quyanh/pythia-2.8b-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "quyanh/pythia-2.8b-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/quyanh/pythia-2.8b-sft
- SGLang
How to use quyanh/pythia-2.8b-sft 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 "quyanh/pythia-2.8b-sft" \ --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": "quyanh/pythia-2.8b-sft", "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 "quyanh/pythia-2.8b-sft" \ --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": "quyanh/pythia-2.8b-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use quyanh/pythia-2.8b-sft with Docker Model Runner:
docker model run hf.co/quyanh/pythia-2.8b-sft
pythia-2.8b-sft
This model is a fine-tuned version of EleutherAI/pythia-2.8b on the None dataset. It achieves the following results on the evaluation set:
- Loss: 1.6671
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 64
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 100
- num_epochs: 1.0
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.8621 | 0.0442 | 100 | 1.7438 |
| 1.7909 | 0.0884 | 200 | 1.7135 |
| 1.7775 | 0.1327 | 300 | 1.7020 |
| 1.7587 | 0.1769 | 400 | 1.6937 |
| 1.7683 | 0.2211 | 500 | 1.6876 |
| 1.7488 | 0.2653 | 600 | 1.6824 |
| 1.7646 | 0.3096 | 700 | 1.6799 |
| 1.7557 | 0.3538 | 800 | 1.6776 |
| 1.7485 | 0.3980 | 900 | 1.6743 |
| 1.7368 | 0.4422 | 1000 | 1.6729 |
| 1.7298 | 0.4865 | 1100 | 1.6705 |
| 1.7525 | 0.5307 | 1200 | 1.6724 |
| 1.7386 | 0.5749 | 1300 | 1.6703 |
| 1.7325 | 0.6191 | 1400 | 1.6684 |
| 1.7306 | 0.6633 | 1500 | 1.6682 |
| 1.7262 | 0.7076 | 1600 | 1.6669 |
| 1.7333 | 0.7518 | 1700 | 1.6675 |
| 1.7318 | 0.7960 | 1800 | 1.6673 |
| 1.7293 | 0.8402 | 1900 | 1.6668 |
| 1.7326 | 0.8845 | 2000 | 1.6671 |
| 1.7378 | 0.9287 | 2100 | 1.6668 |
| 1.7259 | 0.9729 | 2200 | 1.6671 |
Framework versions
- PEFT 0.17.0
- Transformers 4.55.0
- Pytorch 2.7.1+cu126
- Datasets 4.0.0
- Tokenizers 0.21.4
- Downloads last month
- 13
Model tree for quyanh/pythia-2.8b-sft
Base model
EleutherAI/pythia-2.8b
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "quyanh/pythia-2.8b-sft"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "quyanh/pythia-2.8b-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'