neginashz/rationale-llama-chat-dataset
Viewer • Updated • 19.7k • 10
How to use neginashz/star-sft-intellect-instruct-2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="neginashz/star-sft-intellect-instruct-2")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("neginashz/star-sft-intellect-instruct-2")
model = AutoModelForCausalLM.from_pretrained("neginashz/star-sft-intellect-instruct-2", device_map="auto")
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 neginashz/star-sft-intellect-instruct-2 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "neginashz/star-sft-intellect-instruct-2"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "neginashz/star-sft-intellect-instruct-2",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/neginashz/star-sft-intellect-instruct-2
How to use neginashz/star-sft-intellect-instruct-2 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "neginashz/star-sft-intellect-instruct-2" \
--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": "neginashz/star-sft-intellect-instruct-2",
"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 "neginashz/star-sft-intellect-instruct-2" \
--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": "neginashz/star-sft-intellect-instruct-2",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use neginashz/star-sft-intellect-instruct-2 with Docker Model Runner:
docker model run hf.co/neginashz/star-sft-intellect-instruct-2
axolotl version: 0.6.0
base_model: PrimeIntellect/INTELLECT-1-Instruct
trust_remote_code: true
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
gpu_memory_limit:
load_in_8bit:
load_in_4bit:
strict: false
chat_template: llama3
datasets:
- path: neginashz/rationale-llama-chat-dataset
type: chat_template
field_messages: messages
message_field_role: role
message_field_content: content
dataset_prepared_path:
val_set_size: 0.1
output_dir: ./star-sft-intellect-2
sequence_len: 8192
sample_packing: true
eval_sample_packing: true
pad_to_sequence_len: true
wandb_project: star-sft-intellect-instruct-2
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
gradient_accumulation_steps: 1
micro_batch_size: 1
num_epochs: 2
optimizer: adamw_torch
lr_scheduler: cosine
learning_rate: 0.00002
train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: true
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_steps:
eval_steps:
save_steps:
evals_per_epoch: 16
saves_per_epoch: 1
debug:
deepspeed: deepspeed_configs/zero2.json
weight_decay:
fsdp:
fsdp_config:
special_tokens:
pad_token: <|end_of_text|>
pad_token: <|finetune_right_pad_id|>
hub_model_id: neginashz/star-sft-intellect-instruct-2
hub_strategy:
early_stopping_patience:
resume_from_checkpoint:
auto_resume_from_checkpoints: true
This model is a fine-tuned version of PrimeIntellect/INTELLECT-1-Instruct on the neginashz/rationale-llama-chat-dataset dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.5033 | 0.0686 | 7 | 0.4057 |
| 0.4303 | 0.1373 | 14 | 0.3986 |
| 0.4496 | 0.2059 | 21 | 0.3977 |
| 0.4223 | 0.2745 | 28 | 0.3973 |
| 0.4083 | 0.3431 | 35 | 0.3940 |
| 0.4191 | 0.4118 | 42 | 0.3893 |
| 0.412 | 0.4804 | 49 | 0.3859 |
| 0.3912 | 0.5490 | 56 | 0.3812 |
| 0.3995 | 0.6176 | 63 | 0.3749 |
| 0.4236 | 0.6863 | 70 | 0.3703 |
| 0.3833 | 0.7549 | 77 | 0.3663 |
| 0.3605 | 0.8235 | 84 | 0.3614 |
| 0.3952 | 0.8922 | 91 | 0.3576 |
| 0.3744 | 0.9608 | 98 | 0.3540 |
| 0.199 | 1.0196 | 105 | 0.3536 |
| 0.1762 | 1.0882 | 112 | 0.4128 |
| 0.1704 | 1.1569 | 119 | 0.3808 |
| 0.1603 | 1.2255 | 126 | 0.3781 |
| 0.1727 | 1.2941 | 133 | 0.3874 |
| 0.1624 | 1.3627 | 140 | 0.3841 |
| 0.1546 | 1.4314 | 147 | 0.3793 |
| 0.1602 | 1.5 | 154 | 0.3776 |
| 0.1501 | 1.5686 | 161 | 0.3745 |
| 0.146 | 1.6373 | 168 | 0.3734 |
| 0.1512 | 1.7059 | 175 | 0.3733 |
| 0.146 | 1.7745 | 182 | 0.3725 |
| 0.1479 | 1.8431 | 189 | 0.3721 |
| 0.1395 | 1.9118 | 196 | 0.3720 |
| 0.1472 | 1.9804 | 203 | 0.3719 |
Base model
PrimeIntellect/INTELLECT-1