Instructions to use Dapinsky/PIT-4B-FT-202212-math-reasoning-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dapinsky/PIT-4B-FT-202212-math-reasoning-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Dapinsky/PIT-4B-FT-202212-math-reasoning-sft", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Dapinsky/PIT-4B-FT-202212-math-reasoning-sft", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Dapinsky/PIT-4B-FT-202212-math-reasoning-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Dapinsky/PIT-4B-FT-202212-math-reasoning-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dapinsky/PIT-4B-FT-202212-math-reasoning-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Dapinsky/PIT-4B-FT-202212-math-reasoning-sft
- SGLang
How to use Dapinsky/PIT-4B-FT-202212-math-reasoning-sft with 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-sft" \ --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-sft", "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-sft" \ --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-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Dapinsky/PIT-4B-FT-202212-math-reasoning-sft with Docker Model Runner:
docker model run hf.co/Dapinsky/PIT-4B-FT-202212-math-reasoning-sft
Dapinsky/PIT-4B-FT-202212-math-reasoning-sft
This repo contains a full merged model produced from Diamegs/PIT-4B-FT-202212 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-sft", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("Dapinsky/PIT-4B-FT-202212-math-reasoning-sft", trust_remote_code=True)
Training Summary
- Base model:
Diamegs/PIT-4B-FT-202212 - Fine-tuning method: supervised fine-tuning with LoRA, 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_proj",
"c_q",
"c_k",
"c_fc",
"c_v"
],
"base_model_name_or_path": "Diamegs/PIT-4B-FT-202212"
}
- Downloads last month
- 518