openai/gsm8k
Benchmark • Updated • 17.6k • 1.05M • 1.95k
How to use adrian27513/gsm8k_2 with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1")
model = PeftModel.from_pretrained(base_model, "adrian27513/gsm8k_2")How to use adrian27513/gsm8k_2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="adrian27513/gsm8k_2") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("adrian27513/gsm8k_2")
model = AutoModelForCausalLM.from_pretrained("adrian27513/gsm8k_2", device_map="auto")How to use adrian27513/gsm8k_2 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "adrian27513/gsm8k_2"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "adrian27513/gsm8k_2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/adrian27513/gsm8k_2
How to use adrian27513/gsm8k_2 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "adrian27513/gsm8k_2" \
--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": "adrian27513/gsm8k_2",
"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 "adrian27513/gsm8k_2" \
--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": "adrian27513/gsm8k_2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use adrian27513/gsm8k_2 with Docker Model Runner:
docker model run hf.co/adrian27513/gsm8k_2
axolotl version: 0.12.2
base_model: mistralai/Mistral-7B-v0.1
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
load_in_8bit: false
load_in_4bit: false
strict: false
datasets:
- path: openai/gsm8k
split: train
name: main
type:
system_prompt: ""
field_system: system
field_instruction: question
field_output: answer
format: "Question:{instruction}\nAnswer:"
no_input_format: "Question:{instruction}\nAnswer:"
output_dir: ./gsm8k_patch_2
sequence_len: 512
sample_packing: true
pad_to_sequence_len: true
eval_sample_packing: false
adapter: lora
lora_model_dir:
lora_r: 8
lora_alpha: 16
lora_dropout: 0.1
lora_target_linear: true
lora_fan_in_fan_out:
lora_target_modules:
- gate_proj
- down_proj
- up_proj
- q_proj
- v_proj
- k_proj
- o_proj
wandb_project:
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
gradient_accumulation_steps: 1
micro_batch_size: 48
num_epochs: 5
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0004
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
gradient_checkpointing: true
early_stopping_patience:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
loss_watchdog_threshold: 20.0
loss_watchdog_patience: 5
warmup_steps: 30
evals_per_epoch: 0
eval_table_size:
eval_max_new_tokens: 128
saves_per_epoch: 1
debug:
deepspeed:
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
plugins:
- axolotl.integrations.liger.LigerPlugin
liger_rope: true
liger_rms_norm: true
liger_glu_activation: true
liger_layer_norm: true
liger_fused_linear_cross_entropy: true
This model is a fine-tuned version of mistralai/Mistral-7B-v0.1 on the openai/gsm8k dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
Base model
mistralai/Mistral-7B-v0.1