How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="NisalDeZoysa/Qwen-4B-Mathematical-Thinking-GGUF",
	filename="unsloth.Q4_K_M.gguf",
)
llm.create_chat_completion(
	messages = "No input example has been defined for this model task."
)

🧮 Qwen-4B Mathematical Thinking (GGUF)

Base model: unsloth/Qwen3-4B-unsloth-bnb-4bit Quantization: Q4_K_M (GGUF) Language: English License: Apache-2.0

✨ Overview

This is a fine-tuned Qwen-4B model optimized for mathematical reasoning, problem solving, and logical thinking tasks.

Trained with LoRA adapters

Exported in GGUF format (Q4_K_M) → efficient for local hosting

Compatible with Ollama, llama.cpp, and other GGUF-supported frameworks

Although trained only for next-token prediction, it demonstrates emergent reasoning capabilities, allowing it to handle complex tasks with surprising accuracy.

⚡ Features

Efficient 4-bit quantization (Q4_K_M): Low VRAM, ideal for personal/local inference

GGUF format: Works with Ollama, LM Studio, and other GGUF frameworks

Mathematics & logical reasoning: Solves problems, provides step-by-step explanations

Based on Qwen3 architecture: Strong generalization across tasks

Lightweight & fast: Optimized for inference speed without sacrificing accuracy

🏷️ Tags

text-generation-inference | transformers | unsloth | qwen3 | gguf

🎯 Intended Use

Mathematical problem solving

Logical reasoning tasks

Step-by-step explanations

Text generation in English

⚠️ Not recommended for: Critical decision-making or safety-critical applications (hallucinations possible)

💻 Usage Ollama (Local GGUF Hosting) ollama pull hf.co/NisalDeZoysa/Qwen-4B-Mathematical-Thinking-GGUF ollama run hf.co/NisalDeZoysa/Qwen-4B-Mathematical-Thinking-GGUF

Hugging Face Transformers (Python) from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "NisalDeZoysa/Qwen-4B-Mathematical-Thinking-GGUF"

tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained(model_name)

prompt = "Solve the equation: 2x + 3 = 7" inputs = tokenizer(prompt, return_tensors="pt") outputs = model.generate(**inputs, max_new_tokens=50) print(tokenizer.decode(outputs[0], skip_special_tokens=True))

⚠️ Limitations

May produce incorrect or inconsistent outputs for very complex problems

4-bit quantization may lose some fidelity compared to full 16-bit models

Trained on public datasets, so may reflect inherent biases

📄 License

Released under the Apache-2.0 License

Downloads last month
52
GGUF
Model size
4B params
Architecture
qwen3
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for NisalDeZoysa/Qwen-4B-Mathematical-Thinking-GGUF

Quantized
(1)
this model

Dataset used to train NisalDeZoysa/Qwen-4B-Mathematical-Thinking-GGUF