Instructions to use nivektk/BullSolve with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nivektk/BullSolve with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nivektk/BullSolve") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nivektk/BullSolve", dtype="auto") - llama-cpp-python
How to use nivektk/BullSolve with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="nivektk/BullSolve", filename="unsloth.Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use nivektk/BullSolve with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf nivektk/BullSolve:Q4_K_M # Run inference directly in the terminal: llama-cli -hf nivektk/BullSolve:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf nivektk/BullSolve:Q4_K_M # Run inference directly in the terminal: llama-cli -hf nivektk/BullSolve:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf nivektk/BullSolve:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf nivektk/BullSolve:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf nivektk/BullSolve:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf nivektk/BullSolve:Q4_K_M
Use Docker
docker model run hf.co/nivektk/BullSolve:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use nivektk/BullSolve with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nivektk/BullSolve" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nivektk/BullSolve", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nivektk/BullSolve:Q4_K_M
- SGLang
How to use nivektk/BullSolve 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 "nivektk/BullSolve" \ --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": "nivektk/BullSolve", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "nivektk/BullSolve" \ --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": "nivektk/BullSolve", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use nivektk/BullSolve with Ollama:
ollama run hf.co/nivektk/BullSolve:Q4_K_M
- Unsloth Studio new
How to use nivektk/BullSolve with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for nivektk/BullSolve to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for nivektk/BullSolve to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for nivektk/BullSolve to start chatting
- Docker Model Runner
How to use nivektk/BullSolve with Docker Model Runner:
docker model run hf.co/nivektk/BullSolve:Q4_K_M
- Lemonade
How to use nivektk/BullSolve with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull nivektk/BullSolve:Q4_K_M
Run and chat with the model
lemonade run user.BullSolve-Q4_K_M
List all available models
lemonade list
BullSolve: Fine-Tuned LLaMA 3 Model for Math Problem Solving
Model Description
BullSolve is a fine-tuned version of unsloth/llama-3.1-8B-Instruct-unsloth-bnb-4bit, optimized for solving advanced math problems. The model was trained using LoRA adapters with the nivektk/math-augmented-dataset, which contains algebra problems and their solutions.
This model is optimized for low VRAM usage and efficient inference while maintaining high accuracy in mathematical problem-solving tasks.
Training Data
The model was fine-tuned using a subset of the MATH Dataset, specifically the Algebra category, containing 1,006 validated examples. This dataset, originally developed by Dan Hendrycks et al., consists of mathematical problems structured in JSON format, with attributes:
problem: Problem statement in text with LaTeX expressions.level: Difficulty level (1 to 5).type: Mathematical domain (e.g., Algebra, Geometry).solution: Step-by-step solution in English.
For fine-tuning, the dataset was preprocessed into ShareGPT format with the structure:
{question}[[
Solution:
{solution}
]]
Additionally, a chat template was applied for better inference compatibility.
Training Configuration
The model was trained using Unsloth with LoRA, optimizing memory efficiency and inference speed. Key parameters:
- Model:
unsloth/llama-3.1-8B-Instruct-unsloth-bnb-4bit - Max Sequence Length: 2048 tokens
- LoRA Config:
- Rank (
r): 16 - Alpha: 16
- Dropout: 0
- Target Modules:
q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
- Rank (
- Training Arguments:
- Batch Size: 1
- Gradient Accumulation: 4
- Max Steps: 25
- Learning Rate: 1e-4
- Optimizer: AdamW (8-bit)
- Weight Decay: 0.01
- LR Scheduler: Linear
Inference
BullSolve is optimized for fast inference and mathematical problem-solving. Example usage:
from transformers import TextStreamer
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained("nivektk/BullSolve")
FastLanguageModel.for_inference(model)
messages = [{"role": "user", "content": "Evaluate $\\log_{5^2}5^4$."}]
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to("cuda")
text_streamer = TextStreamer(tokenizer, skip_prompt=True)
_ = model.generate(input_ids, streamer=text_streamer, max_new_tokens=2000, pad_token_id=tokenizer.eos_token_id)
Model Usage
This model is suitable for:
- Math tutoring and automated problem-solving
- AI-assisted mathematical reasoning
- Education-based chatbot assistants
Limitations
- The model is trained only on algebra problems and may not generalize well to other areas of mathematics.
- It is optimized for inference efficiency rather than large-scale fine-tuning.
Acknowledgments
- Unsloth for efficient LoRA fine-tuning
- MATH Dataset by Dan Hendrycks for problem-solving benchmarks
Citation
If you use this model, please cite:
@article{BullSolve2025,
title={BullSolve: Fine-Tuned LLaMA 3 for Math Problems},
authors={Kevin Fabio Ramos López and Kevin Camilo Rincon Bohorquez and Nolhan Dumoulin},
year={2025},
journal={Hugging Face Models}
}
Uploaded model
- Developed by: nivektk
- License: apache-2.0
- Finetuned from model : unsloth/llama-3.1-8B-Instruct-unsloth-bnb-4bit
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 28
4-bit
5-bit
8-bit
