Text Generation
Transformers
TensorBoard
Safetensors
llama
trl
sft
Generated from Trainer
conversational
text-generation-inference
Instructions to use Dynosaur/llama3-8b-math-sft-subtask-10-subset with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dynosaur/llama3-8b-math-sft-subtask-10-subset with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Dynosaur/llama3-8b-math-sft-subtask-10-subset") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Dynosaur/llama3-8b-math-sft-subtask-10-subset") model = AutoModelForCausalLM.from_pretrained("Dynosaur/llama3-8b-math-sft-subtask-10-subset") 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 Dynosaur/llama3-8b-math-sft-subtask-10-subset with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Dynosaur/llama3-8b-math-sft-subtask-10-subset" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dynosaur/llama3-8b-math-sft-subtask-10-subset", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Dynosaur/llama3-8b-math-sft-subtask-10-subset
- SGLang
How to use Dynosaur/llama3-8b-math-sft-subtask-10-subset 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 "Dynosaur/llama3-8b-math-sft-subtask-10-subset" \ --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": "Dynosaur/llama3-8b-math-sft-subtask-10-subset", "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 "Dynosaur/llama3-8b-math-sft-subtask-10-subset" \ --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": "Dynosaur/llama3-8b-math-sft-subtask-10-subset", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Dynosaur/llama3-8b-math-sft-subtask-10-subset with Docker Model Runner:
docker model run hf.co/Dynosaur/llama3-8b-math-sft-subtask-10-subset
Upload 5 files
#1
by hexuan21 - opened
- README.md +61 -0
- all_results.json +9 -0
- generation_config.json +9 -0
- train_results.json +9 -0
- trainer_state.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: llama3
|
| 4 |
+
base_model: Dynosaur/llama3-8b-math-sft
|
| 5 |
+
tags:
|
| 6 |
+
- trl
|
| 7 |
+
- sft
|
| 8 |
+
- generated_from_trainer
|
| 9 |
+
model-index:
|
| 10 |
+
- name: llama3-8b-math-sft-subtask-10-subset
|
| 11 |
+
results: []
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
+
|
| 17 |
+
# llama3-8b-math-sft-subtask-10-subset
|
| 18 |
+
|
| 19 |
+
This model is a fine-tuned version of [Dynosaur/llama3-8b-math-sft](https://huggingface.co/Dynosaur/llama3-8b-math-sft) on an unknown dataset.
|
| 20 |
+
|
| 21 |
+
## Model description
|
| 22 |
+
|
| 23 |
+
More information needed
|
| 24 |
+
|
| 25 |
+
## Intended uses & limitations
|
| 26 |
+
|
| 27 |
+
More information needed
|
| 28 |
+
|
| 29 |
+
## Training and evaluation data
|
| 30 |
+
|
| 31 |
+
More information needed
|
| 32 |
+
|
| 33 |
+
## Training procedure
|
| 34 |
+
|
| 35 |
+
### Training hyperparameters
|
| 36 |
+
|
| 37 |
+
The following hyperparameters were used during training:
|
| 38 |
+
- learning_rate: 2e-05
|
| 39 |
+
- train_batch_size: 2
|
| 40 |
+
- eval_batch_size: 8
|
| 41 |
+
- seed: 42
|
| 42 |
+
- distributed_type: multi-GPU
|
| 43 |
+
- num_devices: 8
|
| 44 |
+
- gradient_accumulation_steps: 8
|
| 45 |
+
- total_train_batch_size: 128
|
| 46 |
+
- total_eval_batch_size: 64
|
| 47 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 48 |
+
- lr_scheduler_type: cosine
|
| 49 |
+
- lr_scheduler_warmup_ratio: 0.1
|
| 50 |
+
- num_epochs: 2
|
| 51 |
+
|
| 52 |
+
### Training results
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
### Framework versions
|
| 57 |
+
|
| 58 |
+
- Transformers 4.44.2
|
| 59 |
+
- Pytorch 2.4.1+cu121
|
| 60 |
+
- Datasets 3.0.0
|
| 61 |
+
- Tokenizers 0.19.1
|
all_results.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 1.9977298524404086,
|
| 3 |
+
"total_flos": 60745959505920.0,
|
| 4 |
+
"train_loss": 0.36325452142592635,
|
| 5 |
+
"train_runtime": 2345.5208,
|
| 6 |
+
"train_samples": 42274,
|
| 7 |
+
"train_samples_per_second": 36.047,
|
| 8 |
+
"train_steps_per_second": 0.281
|
| 9 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 128000,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": 128001,
|
| 5 |
+
"max_length": 4096,
|
| 6 |
+
"temperature": 0.6,
|
| 7 |
+
"top_p": 0.9,
|
| 8 |
+
"transformers_version": "4.44.2"
|
| 9 |
+
}
|
train_results.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 1.9977298524404086,
|
| 3 |
+
"total_flos": 60745959505920.0,
|
| 4 |
+
"train_loss": 0.36325452142592635,
|
| 5 |
+
"train_runtime": 2345.5208,
|
| 6 |
+
"train_samples": 42274,
|
| 7 |
+
"train_samples_per_second": 36.047,
|
| 8 |
+
"train_steps_per_second": 0.281
|
| 9 |
+
}
|
trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|