How to use from
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 "Dapinsky/PIT-4B-FT-202212-math-reasoning-dpo" \
    --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": "Dapinsky/PIT-4B-FT-202212-math-reasoning-dpo",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
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 "Dapinsky/PIT-4B-FT-202212-math-reasoning-dpo" \
        --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": "Dapinsky/PIT-4B-FT-202212-math-reasoning-dpo",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

Dapinsky/PIT-4B-FT-202212-math-reasoning-dpo

This repo contains a full merged model produced from Dapinsky/PIT-4B-FT-202212-math-reasoning-sft and a PEFT LoRA adapter. It is intended to be loadable with the same Transformers API used for the base Diamegs PIT model:

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("Dapinsky/PIT-4B-FT-202212-math-reasoning-dpo", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("Dapinsky/PIT-4B-FT-202212-math-reasoning-dpo", trust_remote_code=True)

Training Summary

  • Base model: Dapinsky/PIT-4B-FT-202212-math-reasoning-sft
  • Fine-tuning method: LoRA post-training, merged into the base weights for upload.
  • Tokenizer files copied from: base model

LoRA Configuration

{
  "peft_type": "LORA",
  "task_type": "CAUSAL_LM",
  "r": 16,
  "lora_alpha": 32,
  "lora_dropout": 0.05,
  "target_modules": [
    "c_fc",
    "c_proj",
    "c_v",
    "c_k",
    "c_q"
  ],
  "base_model_name_or_path": "Dapinsky/PIT-4B-FT-202212-math-reasoning-sft"
}
Downloads last month
12
Safetensors
Model size
4B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Dapinsky/PIT-4B-FT-202212-math-reasoning-dpo