Run this model with HF Jobs
Run watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora") - Transformers
How to use watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora
- SGLang
How to use watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora 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 "watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora" \ --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": "watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora", "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 "watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora" \ --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": "watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora with Docker Model Runner:
docker model run hf.co/watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora
Download trainer_state.json from watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora: direct link, hf CLI and curl.
- Browser
- Download file 4.6 kB
-
https://huggingface.co/watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora/resolve/main/trainer_state.json
- Command line
-
hf download hf://watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/watcharabest/Llama-3.2-3B-Instruct-DEMO2-lora/resolve/main/trainer_state.json
4.6 kB
| { | |
| "best_global_step": 150, | |
| "best_metric": 0.8246031999588013, | |
| "best_model_checkpoint": "outputs/checkpoint-150", | |
| "epoch": 5.0, | |
| "eval_steps": 50, | |
| "global_step": 185, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.27586206896551724, | |
| "grad_norm": 4.272644946468063e-05, | |
| "learning_rate": 0.00013333333333333334, | |
| "loss": 1.5589, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.5517241379310345, | |
| "grad_norm": 4.9766633310355246e-05, | |
| "learning_rate": 0.0002814814814814815, | |
| "loss": 1.391, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.8275862068965517, | |
| "grad_norm": 2.7997752113151364e-05, | |
| "learning_rate": 0.0003949367088607595, | |
| "loss": 1.3033, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 1.0827586206896551, | |
| "grad_norm": 2.029500319622457e-05, | |
| "learning_rate": 0.000369620253164557, | |
| "loss": 1.1415, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 1.3586206896551725, | |
| "grad_norm": 2.626476634759456e-05, | |
| "learning_rate": 0.00034430379746835444, | |
| "loss": 1.0856, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 1.3586206896551725, | |
| "eval_loss": 1.0747021436691284, | |
| "eval_runtime": 18.7771, | |
| "eval_samples_per_second": 1.331, | |
| "eval_steps_per_second": 0.692, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 1.6344827586206896, | |
| "grad_norm": 1.5922796592349187e-05, | |
| "learning_rate": 0.00031898734177215193, | |
| "loss": 1.0234, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 1.910344827586207, | |
| "grad_norm": 1.2072891877323855e-05, | |
| "learning_rate": 0.0002936708860759494, | |
| "loss": 0.9674, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 2.1655172413793102, | |
| "grad_norm": 2.2012127374182455e-05, | |
| "learning_rate": 0.00026835443037974687, | |
| "loss": 0.909, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 2.4413793103448276, | |
| "grad_norm": 2.193113323301077e-05, | |
| "learning_rate": 0.00024303797468354434, | |
| "loss": 0.8811, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 2.717241379310345, | |
| "grad_norm": 1.713297751848586e-05, | |
| "learning_rate": 0.00021772151898734177, | |
| "loss": 0.85, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 2.717241379310345, | |
| "eval_loss": 0.8716997504234314, | |
| "eval_runtime": 18.3493, | |
| "eval_samples_per_second": 1.362, | |
| "eval_steps_per_second": 0.708, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 2.9931034482758623, | |
| "grad_norm": 1.709402204141952e-05, | |
| "learning_rate": 0.00019240506329113924, | |
| "loss": 0.8272, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 3.2482758620689656, | |
| "grad_norm": 1.5113208974071313e-05, | |
| "learning_rate": 0.0001670886075949367, | |
| "loss": 0.7782, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 3.524137931034483, | |
| "grad_norm": 1.4607030607294291e-05, | |
| "learning_rate": 0.00014177215189873418, | |
| "loss": 0.7876, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 3.8, | |
| "grad_norm": 1.600632276677061e-05, | |
| "learning_rate": 0.00011645569620253166, | |
| "loss": 0.7712, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 4.055172413793104, | |
| "grad_norm": 1.722386878100224e-05, | |
| "learning_rate": 9.113924050632912e-05, | |
| "loss": 0.7316, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 4.055172413793104, | |
| "eval_loss": 0.8246031999588013, | |
| "eval_runtime": 18.3298, | |
| "eval_samples_per_second": 1.364, | |
| "eval_steps_per_second": 0.709, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 4.3310344827586205, | |
| "grad_norm": 1.3975179172120988e-05, | |
| "learning_rate": 6.582278481012658e-05, | |
| "loss": 0.7281, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 4.606896551724138, | |
| "grad_norm": 1.3770684745395556e-05, | |
| "learning_rate": 4.050632911392405e-05, | |
| "loss": 0.6984, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 4.882758620689655, | |
| "grad_norm": 1.3173920706321951e-05, | |
| "learning_rate": 1.5189873417721521e-05, | |
| "loss": 0.7327, | |
| "step": 180 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 185, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 5, | |
| "save_steps": 50, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 5.091357112664064e+16, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |