Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean") model = AutoModelForCausalLM.from_pretrained("rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean") 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 rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean
- SGLang
How to use rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean 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 "rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean" \ --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": "rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean", "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 "rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean" \ --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": "rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean with Docker Model Runner:
docker model run hf.co/rkumar1999/Llama-3.1-8B-Instruct-Open-R1-Distill-Lean
Model save
Browse files- README.md +2 -4
- adapter_config.json +2 -2
- adapter_model.safetensors +1 -1
- all_results.json +5 -5
- runs/Mar03_21-17-14_ip-10-192-12-214/events.out.tfevents.1741036644.ip-10-192-12-214.31425.0 +3 -0
- train_results.json +5 -5
- trainer_state.json +9 -9
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
| 1 |
---
|
| 2 |
base_model: meta-llama/Llama-3.1-8B-Instruct
|
| 3 |
-
datasets: Tonic/MiniF2F
|
| 4 |
library_name: transformers
|
| 5 |
model_name: Llama-3.1-8B-Instruct-Open-R1-Distill-Lean
|
| 6 |
tags:
|
| 7 |
- generated_from_trainer
|
| 8 |
-
- open-r1
|
| 9 |
- trl
|
| 10 |
- sft
|
| 11 |
licence: license
|
|
@@ -13,7 +11,7 @@ licence: license
|
|
| 13 |
|
| 14 |
# Model Card for Llama-3.1-8B-Instruct-Open-R1-Distill-Lean
|
| 15 |
|
| 16 |
-
This model is a fine-tuned version of [meta-llama/Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct)
|
| 17 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 18 |
|
| 19 |
## Quick start
|
|
@@ -29,7 +27,7 @@ print(output["generated_text"])
|
|
| 29 |
|
| 30 |
## Training procedure
|
| 31 |
|
| 32 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/rohanbayya1205-san-jose-state-university/huggingface/runs/
|
| 33 |
|
| 34 |
|
| 35 |
This model was trained with SFT.
|
|
|
|
| 1 |
---
|
| 2 |
base_model: meta-llama/Llama-3.1-8B-Instruct
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: Llama-3.1-8B-Instruct-Open-R1-Distill-Lean
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
- sft
|
| 9 |
licence: license
|
|
|
|
| 11 |
|
| 12 |
# Model Card for Llama-3.1-8B-Instruct-Open-R1-Distill-Lean
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [meta-llama/Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
|
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/rohanbayya1205-san-jose-state-university/huggingface/runs/rl8xdbu7)
|
| 31 |
|
| 32 |
|
| 33 |
This model was trained with SFT.
|
adapter_config.json
CHANGED
|
@@ -24,9 +24,9 @@
|
|
| 24 |
"revision": null,
|
| 25 |
"target_modules": [
|
| 26 |
"o_proj",
|
|
|
|
| 27 |
"k_proj",
|
| 28 |
-
"v_proj"
|
| 29 |
-
"q_proj"
|
| 30 |
],
|
| 31 |
"task_type": "CAUSAL_LM",
|
| 32 |
"use_dora": true,
|
|
|
|
| 24 |
"revision": null,
|
| 25 |
"target_modules": [
|
| 26 |
"o_proj",
|
| 27 |
+
"q_proj",
|
| 28 |
"k_proj",
|
| 29 |
+
"v_proj"
|
|
|
|
| 30 |
],
|
| 31 |
"task_type": "CAUSAL_LM",
|
| 32 |
"use_dora": true,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7522752
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d80adfc6a5efc9cfe88bcdaf9fee15d1da4c8e085b7b344176dd37d21f39eb80
|
| 3 |
size 7522752
|
all_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
-
"total_flos":
|
| 3 |
-
"train_loss":
|
| 4 |
-
"train_runtime":
|
| 5 |
"train_samples": 488,
|
| 6 |
-
"train_samples_per_second":
|
| 7 |
-
"train_steps_per_second": 0.
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"total_flos": 3737225527296.0,
|
| 3 |
+
"train_loss": 33168.128967285156,
|
| 4 |
+
"train_runtime": 78.7129,
|
| 5 |
"train_samples": 488,
|
| 6 |
+
"train_samples_per_second": 2.287,
|
| 7 |
+
"train_steps_per_second": 0.254
|
| 8 |
}
|
runs/Mar03_21-17-14_ip-10-192-12-214/events.out.tfevents.1741036644.ip-10-192-12-214.31425.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df0ca1acb1f86d1f3e1d89675ba8a6f99f2ab6dfcd414fad91a483b8e19a063b
|
| 3 |
+
size 6506
|
train_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
-
"total_flos":
|
| 3 |
-
"train_loss":
|
| 4 |
-
"train_runtime":
|
| 5 |
"train_samples": 488,
|
| 6 |
-
"train_samples_per_second":
|
| 7 |
-
"train_steps_per_second": 0.
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"total_flos": 3737225527296.0,
|
| 3 |
+
"train_loss": 33168.128967285156,
|
| 4 |
+
"train_runtime": 78.7129,
|
| 5 |
"train_samples": 488,
|
| 6 |
+
"train_samples_per_second": 2.287,
|
| 7 |
+
"train_steps_per_second": 0.254
|
| 8 |
}
|
trainer_state.json
CHANGED
|
@@ -10,19 +10,19 @@
|
|
| 10 |
"log_history": [
|
| 11 |
{
|
| 12 |
"epoch": 0,
|
| 13 |
-
"mean_token_accuracy": 0.
|
| 14 |
"step": 0,
|
| 15 |
-
"total_flos":
|
| 16 |
-
"train_loss":
|
| 17 |
-
"train_runtime":
|
| 18 |
-
"train_samples_per_second":
|
| 19 |
-
"train_steps_per_second": 0.
|
| 20 |
}
|
| 21 |
],
|
| 22 |
"logging_steps": 500,
|
| 23 |
-
"max_steps":
|
| 24 |
"num_input_tokens_seen": 0,
|
| 25 |
-
"num_train_epochs":
|
| 26 |
"save_steps": 500,
|
| 27 |
"stateful_callbacks": {
|
| 28 |
"TrainerControl": {
|
|
@@ -36,7 +36,7 @@
|
|
| 36 |
"attributes": {}
|
| 37 |
}
|
| 38 |
},
|
| 39 |
-
"total_flos":
|
| 40 |
"train_batch_size": 2,
|
| 41 |
"trial_name": null,
|
| 42 |
"trial_params": null
|
|
|
|
| 10 |
"log_history": [
|
| 11 |
{
|
| 12 |
"epoch": 0,
|
| 13 |
+
"mean_token_accuracy": 0.6642943471670151,
|
| 14 |
"step": 0,
|
| 15 |
+
"total_flos": 3737225527296.0,
|
| 16 |
+
"train_loss": 33168.128967285156,
|
| 17 |
+
"train_runtime": 78.7129,
|
| 18 |
+
"train_samples_per_second": 2.287,
|
| 19 |
+
"train_steps_per_second": 0.254
|
| 20 |
}
|
| 21 |
],
|
| 22 |
"logging_steps": 500,
|
| 23 |
+
"max_steps": 20,
|
| 24 |
"num_input_tokens_seen": 0,
|
| 25 |
+
"num_train_epochs": 20,
|
| 26 |
"save_steps": 500,
|
| 27 |
"stateful_callbacks": {
|
| 28 |
"TrainerControl": {
|
|
|
|
| 36 |
"attributes": {}
|
| 37 |
}
|
| 38 |
},
|
| 39 |
+
"total_flos": 3737225527296.0,
|
| 40 |
"train_batch_size": 2,
|
| 41 |
"trial_name": null,
|
| 42 |
"trial_params": null
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7352
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe6a1413db8bfaa2c249f4c9a06e39b05fc03a29e90894f1e1a020a801111c97
|
| 3 |
size 7352
|