Text Generation
Transformers
Safetensors
llama
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06") model = AutoModelForCausalLM.from_pretrained("Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06
- SGLang
How to use Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06 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 "Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06" \ --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": "Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06", "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 "Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06" \ --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": "Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06 with Docker Model Runner:
docker model run hf.co/Neelectric/Llama-3.1-8B-Instruct_SafeGrad_mathv00.06
Model save
Browse files- .gitattributes +1 -0
- all_results.json +8 -0
- generation_config.json +1 -6
- train_results.json +8 -0
- trainer_state.json +3 -0
.gitattributes
CHANGED
|
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
trainer_state.json filter=lfs diff=lfs merge=lfs -text
|
all_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"total_flos": 4.901208808529225e+19,
|
| 3 |
+
"train_loss": 0.6562395163813363,
|
| 4 |
+
"train_runtime": 67493.6677,
|
| 5 |
+
"train_samples": 125770,
|
| 6 |
+
"train_samples_per_second": 5.59,
|
| 7 |
+
"train_steps_per_second": 0.349
|
| 8 |
+
}
|
generation_config.json
CHANGED
|
@@ -1,12 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"bos_token_id": 128000,
|
| 3 |
"do_sample": true,
|
| 4 |
-
"eos_token_id":
|
| 5 |
-
128009,
|
| 6 |
-
128001,
|
| 7 |
-
128008,
|
| 8 |
-
128009
|
| 9 |
-
],
|
| 10 |
"pad_token_id": 128009,
|
| 11 |
"temperature": 0.6,
|
| 12 |
"top_p": 0.9,
|
|
|
|
| 1 |
{
|
| 2 |
"bos_token_id": 128000,
|
| 3 |
"do_sample": true,
|
| 4 |
+
"eos_token_id": 128009,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"pad_token_id": 128009,
|
| 6 |
"temperature": 0.6,
|
| 7 |
"top_p": 0.9,
|
train_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"total_flos": 4.901208808529225e+19,
|
| 3 |
+
"train_loss": 0.6562395163813363,
|
| 4 |
+
"train_runtime": 67493.6677,
|
| 5 |
+
"train_samples": 125770,
|
| 6 |
+
"train_samples_per_second": 5.59,
|
| 7 |
+
"train_steps_per_second": 0.349
|
| 8 |
+
}
|
trainer_state.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:48e5a35edbff72f8e8409955975d60854b9713e28dd7bbb154a1c9c63c536f49
|
| 3 |
+
size 19325547
|