Instructions to use howellx/qwen25-7b-scientific-reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use howellx/qwen25-7b-scientific-reasoning with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="howellx/qwen25-7b-scientific-reasoning", filename="qwen25-7b-scientific-reasoning-f16.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 howellx/qwen25-7b-scientific-reasoning with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf howellx/qwen25-7b-scientific-reasoning:F16 # Run inference directly in the terminal: llama-cli -hf howellx/qwen25-7b-scientific-reasoning:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf howellx/qwen25-7b-scientific-reasoning:F16 # Run inference directly in the terminal: llama-cli -hf howellx/qwen25-7b-scientific-reasoning:F16
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 howellx/qwen25-7b-scientific-reasoning:F16 # Run inference directly in the terminal: ./llama-cli -hf howellx/qwen25-7b-scientific-reasoning:F16
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 howellx/qwen25-7b-scientific-reasoning:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf howellx/qwen25-7b-scientific-reasoning:F16
Use Docker
docker model run hf.co/howellx/qwen25-7b-scientific-reasoning:F16
- LM Studio
- Jan
- vLLM
How to use howellx/qwen25-7b-scientific-reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "howellx/qwen25-7b-scientific-reasoning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "howellx/qwen25-7b-scientific-reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/howellx/qwen25-7b-scientific-reasoning:F16
- Ollama
How to use howellx/qwen25-7b-scientific-reasoning with Ollama:
ollama run hf.co/howellx/qwen25-7b-scientific-reasoning:F16
- Unsloth Studio new
How to use howellx/qwen25-7b-scientific-reasoning 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 howellx/qwen25-7b-scientific-reasoning 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 howellx/qwen25-7b-scientific-reasoning to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for howellx/qwen25-7b-scientific-reasoning to start chatting
- Pi new
How to use howellx/qwen25-7b-scientific-reasoning with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf howellx/qwen25-7b-scientific-reasoning:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "howellx/qwen25-7b-scientific-reasoning:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use howellx/qwen25-7b-scientific-reasoning with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf howellx/qwen25-7b-scientific-reasoning:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default howellx/qwen25-7b-scientific-reasoning:F16
Run Hermes
hermes
- Docker Model Runner
How to use howellx/qwen25-7b-scientific-reasoning with Docker Model Runner:
docker model run hf.co/howellx/qwen25-7b-scientific-reasoning:F16
- Lemonade
How to use howellx/qwen25-7b-scientific-reasoning with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull howellx/qwen25-7b-scientific-reasoning:F16
Run and chat with the model
lemonade run user.qwen25-7b-scientific-reasoning-F16
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)Qwen2.5-7B Scientific Reasoning
Fine-tuned version of Qwen/Qwen2.5-7B-Instruct on 525 chain-of-thought scientific reasoning examples.
Model Description
This model has been fine-tuned to provide explicit step-by-step reasoning for problem-solving tasks. It excels at:
- Mathematical word problems
- Scientific reasoning
- Logic puzzles
- Multi-step calculations
- Transparent thought processes
Training Details
- Base Model: Qwen2.5-7B-Instruct
- Training Data: 525 scientific reasoning examples with chain-of-thought reasoning
- Training Method: LoRA (Low-Rank Adaptation)
- Rank: 16
- Alpha: 32
- Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Quantization: 4-bit (during training)
- Training Time: 1 hour 17 minutes
- Training Loss: 1.19 → 0.47 (61% reduction)
- Eval Loss: 0.746
- Epochs: 3
- Total Steps: 189
Key Features
✅ Explicit Reasoning: Model shows its thinking process with "Let me think through this:" prefix ✅ Step-by-Step Solutions: Breaks down complex problems into manageable steps ✅ Self-Verification: Often double-checks calculations and reasoning ✅ Pedagogical: Great for educational contexts and tutoring ✅ 100% Accuracy: Achieved perfect accuracy on comparison benchmark tests
Usage
Using Transformers
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "howellx/qwen25-7b-scientific-reasoning"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
messages = [
{"role": "system", "content": "You are a skilled problem solver. Break down complex problems into manageable steps, show your reasoning process, and provide clear answers."},
{"role": "user", "content": "A store sells apples for $3 per pound. If you buy 4 pounds and get a 15% discount, how much do you pay?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.7,
do_sample=True,
top_p=0.9,
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response.split("assistant\n")[-1])
Using Ollama (GGUF version)
The GGUF version is also available for use with Ollama/llama.cpp.
Example Outputs
Input: "A store sells apples for $3 per pound. If you buy 4 pounds and get a 15% discount, how much do you pay?"
Output:
Let me think through this:
Step 1: Calculate total cost before discount
- Price per pound: $3
- Quantity purchased: 4 pounds
Total cost = $3 × 4 = $12
Step 2: Apply the 15% discount
Discount amount = Total cost × Discount rate
= $12 × 0.15 = $1.80
Step 3: Calculate final payment
Final payment = Total cost - Discount amount
= $12 - $1.80 = $10.20
Therefore, you pay $10.20.
Comparison with Base Model
Compared to the base Qwen2.5-7B-Instruct model:
- ✅ Shows explicit "Let me think through this:" reasoning prefix
- ✅ More transparent step-by-step problem decomposition
- ✅ Includes self-verification and double-checking
- ✅ 2-3x longer responses but more educational
- ✅ Same accuracy, better pedagogical value
Best Use Cases
- Educational tutoring and homework help
- Teaching problem-solving strategies
- Scientific and mathematical reasoning tasks
- Situations requiring transparent reasoning
- Applications where showing work is important
Limitations
- Responses are more verbose (2-3x longer than base model)
- Optimized for reasoning tasks, may be overkill for simple queries
- Fine-tuned on English scientific reasoning examples
Citation
If you use this model, please cite:
@misc{qwen25-scientific-reasoning,
author = {Justin Howell},
title = {Qwen2.5-7B Scientific Reasoning},
year = {2026},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/howellx/qwen25-7b-scientific-reasoning}}
}
License
Apache 2.0 (same as base Qwen2.5 model)
Acknowledgments
- Base model: Qwen Team
- Training framework: HuggingFace Transformers + PEFT
- Distillation pipeline: Custom Claude-based chain-of-thought generation
- Downloads last month
- 72
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="howellx/qwen25-7b-scientific-reasoning", filename="qwen25-7b-scientific-reasoning-f16.gguf", )