Instructions to use ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k") - Transformers
How to use ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k
- SGLang
How to use ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k 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 "ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k with Docker Model Runner:
docker model run hf.co/ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k
crfTask-Llama-3.1-8B-Instruct-50k
This model is a fine-tuned version of meta-llama/Llama-3.1-8B-Instruct on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.5774
- F1 Micro: 0.9402
- F1 Macro: 0.4933
- F1 Weighted: 0.9471
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: 0.0003
- train_batch_size: 16
- eval_batch_size: 1
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 4
- total_train_batch_size: 64
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-07 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 1
Training results
| Training Loss | Epoch | Step | Validation Loss | F1 Micro | F1 Macro | F1 Weighted |
|---|---|---|---|---|---|---|
| 7.2391 | 0.0776 | 60 | 1.4732 | 0.9236 | 0.4915 | 0.9288 |
| 6.1125 | 0.1551 | 120 | 1.1646 | 0.9502 | 0.5644 | 0.9527 |
| 5.1969 | 0.2327 | 180 | 1.0281 | 0.9369 | 0.5613 | 0.9423 |
| 4.7516 | 0.3103 | 240 | 0.9565 | 0.9369 | 0.6218 | 0.9430 |
| 4.4234 | 0.3878 | 300 | 0.8937 | 0.9568 | 0.6956 | 0.9594 |
| 4.0875 | 0.4654 | 360 | 0.8211 | 0.9502 | 0.6371 | 0.9525 |
| 3.6719 | 0.5430 | 420 | 0.7511 | 0.9402 | 0.5671 | 0.9461 |
| 3.2602 | 0.6206 | 480 | 0.6904 | 0.9468 | 0.5349 | 0.9526 |
| 3.0242 | 0.6981 | 540 | 0.6438 | 0.9369 | 0.5245 | 0.9441 |
| 2.6406 | 0.7757 | 600 | 0.6117 | 0.9402 | 0.4956 | 0.9465 |
| 2.5996 | 0.8533 | 660 | 0.5892 | 0.9369 | 0.4928 | 0.9438 |
| 2.6277 | 0.9308 | 720 | 0.5774 | 0.9402 | 0.4933 | 0.9471 |
Framework versions
- PEFT 0.18.1
- Transformers 4.51.0
- Pytorch 2.8.0+cu128
- Datasets 3.6.0
- Tokenizers 0.21.0
- Downloads last month
- 2
Model tree for ferrazzipietro/crfTask-Llama-3.1-8B-Instruct-50k
Base model
meta-llama/Llama-3.1-8B Finetuned
meta-llama/Llama-3.1-8B-Instruct