AlexHung29629/train_0415_input_output
Viewer • Updated • 1.49M • 4
How to use AlexHung29629/mistral-small-reasoning with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="AlexHung29629/mistral-small-reasoning") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("AlexHung29629/mistral-small-reasoning")
model = AutoModelForCausalLM.from_pretrained("AlexHung29629/mistral-small-reasoning", device_map="auto")How to use AlexHung29629/mistral-small-reasoning with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "AlexHung29629/mistral-small-reasoning"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "AlexHung29629/mistral-small-reasoning",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/AlexHung29629/mistral-small-reasoning
How to use AlexHung29629/mistral-small-reasoning with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "AlexHung29629/mistral-small-reasoning" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "AlexHung29629/mistral-small-reasoning",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "AlexHung29629/mistral-small-reasoning" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "AlexHung29629/mistral-small-reasoning",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use AlexHung29629/mistral-small-reasoning with Docker Model Runner:
docker model run hf.co/AlexHung29629/mistral-small-reasoning
axolotl version: 0.8.1
base_model: ./placeholder_embed/merged/
plugins:
- axolotl.integrations.liger.LigerPlugin
liger_rope: true
liger_rms_norm: true
liger_glu_activation: true
liger_fused_linear_cross_entropy: true
datasets:
- path: AlexHung29629/train_0415_input_output
type: input_output
dataset_prepared_path: ./sft_dataprep/
val_set_size: 0
output_dir: ./placeholder_sft/
shuffle_merged_datasets: false
#eval_steps: 10
#eval_strategy:
sequence_len: 32768
sample_packing: true
eval_sample_packing: false
pad_to_sequence_len: true
wandb_project: Reasoning_TP1_2025
wandb_entity:
wandb_watch:
wandb_name: Mistral-24B-SFT-Reasoning-250414_sft
wandb_log_model:
gradient_accumulation_steps: 2
micro_batch_size: 1
num_epochs: 5
optimizer: adamw_torch_fused
lr_scheduler: cosine
learning_rate: 1e-5
max_grad_norm: 1.0
adam_beta1: 0.9
adam_beta2: 0.95
adam_epsilon: 1e-8
bf16: true
tf32: false
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: true
logging_steps: 1
flash_attention: true
xformers_attention: false
sdp_attention: false
warmup_ratio: 0.05
saves_per_epoch: 1
save_total_limit: 5
weight_decay: 0.1
deepspeed: /mnt/shared/twsc/alex/reasoning/zero3_bf16.json
special_tokens:
pad_token: "<pad>"
#added_tokens_overrides: # Dict[int, str]
# 20: "<think>"
# 21: "</think>"
seed: 42
This model was trained from scratch on the AlexHung29629/train_0415_input_output dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training: