Text Generation
Transformers
Safetensors
English
llama
math
reasoning
mathematics
causal-lm
text-generation-inference
Instructions to use KiteFishAI/Minnow-Math-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KiteFishAI/Minnow-Math-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KiteFishAI/Minnow-Math-2B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KiteFishAI/Minnow-Math-2B") model = AutoModelForCausalLM.from_pretrained("KiteFishAI/Minnow-Math-2B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use KiteFishAI/Minnow-Math-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KiteFishAI/Minnow-Math-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KiteFishAI/Minnow-Math-2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KiteFishAI/Minnow-Math-2B
- SGLang
How to use KiteFishAI/Minnow-Math-2B 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 "KiteFishAI/Minnow-Math-2B" \ --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": "KiteFishAI/Minnow-Math-2B", "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 "KiteFishAI/Minnow-Math-2B" \ --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": "KiteFishAI/Minnow-Math-2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KiteFishAI/Minnow-Math-2B with Docker Model Runner:
docker model run hf.co/KiteFishAI/Minnow-Math-2B
README.md updated
Browse files- .gitignore +1 -0
- README.md +32 -1
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
._*
|
README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🐟 Math-A1-2B
|
| 2 |
+
|
| 3 |
+
**Math-A1-2B** is a 2B-parameter language model by **Kitefish**, focused on mathematical reasoning, symbolic understanding, and structured problem solving.
|
| 4 |
+
|
| 5 |
+
This is an early release and part of our ongoing effort to build strong, efficient models for reasoning-heavy tasks.
|
| 6 |
+
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
## ✨ What this model is good at
|
| 10 |
+
|
| 11 |
+
- Basic to intermediate **math problem solving**
|
| 12 |
+
- **Step-by-step reasoning** for equations and word problems
|
| 13 |
+
- Understanding **mathematical symbols and structure**
|
| 14 |
+
- Educational and experimentation use cases
|
| 15 |
+
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
## 🚀 Quick start
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 22 |
+
|
| 23 |
+
tokenizer = AutoTokenizer.from_pretrained("kitefish/math-a1-2B")
|
| 24 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 25 |
+
"kitefish/math-a1-2B",
|
| 26 |
+
torch_dtype="auto",
|
| 27 |
+
device_map="auto"
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
prompt = "Solve: 2x + 5 = 13"
|
| 31 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 32 |
+
|
| 33 |
+
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 34 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|