nvidia/Llama-Nemotron-Post-Training-Dataset
Viewer • Updated • 3.91M • 4.91k • 664
How to use cemig-temp/llama3.1-8b-instruct-data-nemotron with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="cemig-temp/llama3.1-8b-instruct-data-nemotron")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("cemig-temp/llama3.1-8b-instruct-data-nemotron")
model = AutoModelForCausalLM.from_pretrained("cemig-temp/llama3.1-8b-instruct-data-nemotron")
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]:]))How to use cemig-temp/llama3.1-8b-instruct-data-nemotron with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "cemig-temp/llama3.1-8b-instruct-data-nemotron"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "cemig-temp/llama3.1-8b-instruct-data-nemotron",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/cemig-temp/llama3.1-8b-instruct-data-nemotron
How to use cemig-temp/llama3.1-8b-instruct-data-nemotron with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "cemig-temp/llama3.1-8b-instruct-data-nemotron" \
--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": "cemig-temp/llama3.1-8b-instruct-data-nemotron",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "cemig-temp/llama3.1-8b-instruct-data-nemotron" \
--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": "cemig-temp/llama3.1-8b-instruct-data-nemotron",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use cemig-temp/llama3.1-8b-instruct-data-nemotron with Docker Model Runner:
docker model run hf.co/cemig-temp/llama3.1-8b-instruct-data-nemotron
axolotl version: 0.13.0.dev0
base_model: meta-llama/Llama-3.1-8B-Instruct
tokenizer_type: AutoTokenizer
trust_remote_code: true
is_llama_derived_model: true
datasets:
- path: nvidia/Llama-Nemotron-Post-Training-Dataset
type:
system_prompt: ""
field_instruction: input
field_input: ""
field_output: output
format: |-
{instruction}
split: chat
val_set_size: 0.01
micro_batch_size: 1
gradient_accumulation_steps: 8
sequence_len: 8192
eval_sequence_len: 8192
pad_to_sequence_len: true
sample_packing: true
optimizer: adamw_torch_fused
learning_rate: 2.0e-5
weight_decay: 0.0
betas: [0.9, 0.999]
eps: 1.0e-8
lr_scheduler: cosine
warmup_steps: 100
bf16: true
tf32: true
gradient_checkpointing: true
special_tokens:
eos_token: "<|eot_id|>"
pad_token: "<|eot_id|>"
eot_tokens:
- "<|eot_id|>"
roles_to_train:
- assistant
train_on_eos: last
save_strategy: steps
save_steps: 100
save_total_limit: 3
save_safetensors: true
load_best_model_at_end: true
metric_for_best_model: eval_loss
greater_is_better: false
logging_steps: 10
output_dir: ./outputs/llama31_full_sft_instruct_data_nemotron
seed: 42
This model is a fine-tuned version of meta-llama/Llama-3.1-8B-Instruct on the nvidia/Llama-Nemotron-Post-Training-Dataset dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
Base model
meta-llama/Llama-3.1-8B