ptllama/acemath_test_2
Viewer • Updated • 5.56M • 13
How to use ptllama/llama3b-2e4-2m-test2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ptllama/llama3b-2e4-2m-test2") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("ptllama/llama3b-2e4-2m-test2")
model = AutoModelForCausalLM.from_pretrained("ptllama/llama3b-2e4-2m-test2")How to use ptllama/llama3b-2e4-2m-test2 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ptllama/llama3b-2e4-2m-test2"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ptllama/llama3b-2e4-2m-test2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ptllama/llama3b-2e4-2m-test2
How to use ptllama/llama3b-2e4-2m-test2 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ptllama/llama3b-2e4-2m-test2" \
--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": "ptllama/llama3b-2e4-2m-test2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "ptllama/llama3b-2e4-2m-test2" \
--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": "ptllama/llama3b-2e4-2m-test2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ptllama/llama3b-2e4-2m-test2 with Docker Model Runner:
docker model run hf.co/ptllama/llama3b-2e4-2m-test2
axolotl version: 0.7.0
base_model: meta-llama/Llama-3.2-3B
# Automatically upload checkpoint and final model to HF
# hub_model_id: username/custom_model_name
load_in_8bit: false
load_in_4bit: false
strict: false
datasets:
- path: ptllama/acemath_test_2
type: completion
# pretraining_dataset:
# - name:
# path: ptllama/acemath_test
# split:
# text_column: text # column in dataset with the data, usually `text`
# type: pretrain
# trust_remote_code:
# skip: # number of rows of data to skip over from the beginning
dataset_prepared_path: last_run_prepared
val_set_size: 0.01
output_dir: ./outputs/out
sequence_len: 4096
sample_packing: true
pad_to_sequence_len: true
eval_sample_packing: false
wandb_project: axolotl-pretraining
wandb_entity:
wandb_watch:
wandb_name: test2-2e4
wandb_log_model:
gradient_accumulation_steps: 16
micro_batch_size: 4
num_epochs: 1
optimizer: paged_adamw_8bit
lr_scheduler: cosine
learning_rate: 2e-4
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
early_stopping_patience:
resume_from_checkpoint:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_ratio: 0.01
cosine_min_lr_ratio: 0.1
cosine_constant_lr_ratio: 0.9
evals_per_epoch: 2
eval_table_size:
saves_per_epoch: 1
debug:
deepspeed:
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
pad_token: <|end_of_text|>
This model is a fine-tuned version of meta-llama/Llama-3.2-3B on the ptllama/acemath_test_2 dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.9006 | 0.0006 | 1 | 0.9558 |
| 0.2852 | 0.5001 | 862 | 0.2925 |
Base model
meta-llama/Llama-3.2-3B