Text Generation
Transformers
Safetensors
llama
Generated from Trainer
conversational
text-generation-inference
Instructions to use cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo") model = AutoModelForCausalLM.from_pretrained("cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo
- SGLang
How to use cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo 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 "cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo" \ --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": "cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo", "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 "cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo" \ --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": "cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo with Docker Model Runner:
docker model run hf.co/cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo
See axolotl config
axolotl version: 0.13.0.dev0
base_model: meta-llama/Llama-3.2-3B-Instruct
trust_remote_code: true
strict: false
chat_template: llama3
load_in_8bit: false
load_in_4bit: false
plugins:
- axolotl.integrations.liger.LigerPlugin
liger_rope: true
liger_rms_norm: true
liger_glu_activation: true
liger_layer_norm: true
liger_fused_linear_cross_entropy: true
datasets:
- path: ./outputs/dataset_tokenlab/train
type: chat_template
weight: 0.8
- path: ./outputs/dataset_cemig/train
type: chat_template
weight: 0.2
validation_datasets:
- path: ./outputs/dataset_tokenlab/validation
type: chat_template
weight: 0.8
- path: ./outputs/dataset_cemig/validation
type: chat_template
weight: 0.2
test_datasets:
- path: ./outputs/dataset_tokenlab/test
type: chat_template
weight: 0.8
- path: ./outputs/dataset_cemig/test
type: chat_template
weight: 0.2
val_set_size: 0.0
dataset_prepared_path: ./outputs/dataset_prepared
output_dir: ./outputs/cemig-sft-2gpu/
sequence_len: 4096
sample_packing: true
pad_to_sequence_len: true
flash_attn: true
gradient_checkpointing: true
micro_batch_size: 4
gradient_accumulation_steps: 4
num_epochs: 2
optimizer: adamw_torch_fused
learning_rate: 1.0e-5
lr_scheduler: cosine
cosine_constant_lr_ratio: 0
cosine_min_lr_ratio: 0.1
warmup_ratio: 0.1
weight_decay: 0.0
bf16: true
tf32: true
save_only_model: true
logging_steps: 1
evals_per_epoch: 4
saves_per_epoch: 2
special_tokens:
pad_token: <|finetune_right_pad_id|>
dataloader_num_workers: 4
dataloader_prefetch_factor: 2
wandb_project: llama32-3b-dados-cemig
wandb_entity: null
wandb_name: llama3.2-3b-tokenlab-more-cemig-data
wandb_log_model: checkpoint
outputs/cemig-sft-2gpu/
This model is a fine-tuned version of meta-llama/Llama-3.2-3B-Instruct on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.7199
- Memory/max Active (gib): 47.38
- Memory/max Allocated (gib): 47.38
- Memory/device Reserved (gib): 47.9
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: 1e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- num_devices: 2
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- total_eval_batch_size: 8
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED 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: 3136
- training_steps: 31360
Training results
| Training Loss | Epoch | Step | Validation Loss | Active (gib) | Allocated (gib) | Reserved (gib) |
|---|---|---|---|---|---|---|
| No log | 0 | 0 | 2.6370 | 33.94 | 33.94 | 34.49 |
| 0.7927 | 0.2500 | 3920 | 0.8321 | 47.38 | 47.38 | 49.42 |
| 0.7541 | 0.5000 | 7840 | 0.7620 | 47.38 | 47.38 | 47.9 |
| 0.7028 | 0.7500 | 11760 | 0.7397 | 47.38 | 47.38 | 47.9 |
| 0.6949 | 1.0 | 15680 | 0.7298 | 47.38 | 47.38 | 47.9 |
| 0.6793 | 1.2500 | 19600 | 0.7247 | 47.38 | 47.38 | 47.9 |
| 0.71 | 1.5000 | 23520 | 0.7221 | 47.38 | 47.38 | 47.9 |
| 0.6818 | 1.7500 | 27440 | 0.7207 | 47.38 | 47.38 | 47.9 |
| 0.6828 | 2.0 | 31360 | 0.7199 | 47.38 | 47.38 | 47.9 |
Framework versions
- Transformers 4.57.1
- Pytorch 2.9.0+cu130
- Datasets 4.3.0
- Tokenizers 0.22.1
- Downloads last month
- 1
Model tree for cemig-temp/llama3.2-3b-instruct-tokenlab-cemigConvo
Base model
meta-llama/Llama-3.2-3B-Instruct