Text Generation
Transformers
Safetensors
English
slm
arithmetic
math
causal-lm
custom_code
Eval Results (legacy)
Instructions to use WhirlwindAI/Arithmetic-SLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WhirlwindAI/Arithmetic-SLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WhirlwindAI/Arithmetic-SLM", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("WhirlwindAI/Arithmetic-SLM", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WhirlwindAI/Arithmetic-SLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WhirlwindAI/Arithmetic-SLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WhirlwindAI/Arithmetic-SLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WhirlwindAI/Arithmetic-SLM
- SGLang
How to use WhirlwindAI/Arithmetic-SLM 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 "WhirlwindAI/Arithmetic-SLM" \ --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": "WhirlwindAI/Arithmetic-SLM", "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 "WhirlwindAI/Arithmetic-SLM" \ --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": "WhirlwindAI/Arithmetic-SLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WhirlwindAI/Arithmetic-SLM with Docker Model Runner:
docker model run hf.co/WhirlwindAI/Arithmetic-SLM
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,23 +32,6 @@ model-index:
|
|
| 32 |
|
| 33 |

|
| 34 |
|
| 35 |
-
# Arithmetic-SLM
|
| 36 |
-
|
| 37 |
-
Arithmetic-SLM is a small language model specialized for arithmetic continuation. It is designed to be highly efficient on numerical operations with mostly two-digit numbers in patterns such as:
|
| 38 |
-
|
| 39 |
-
```text
|
| 40 |
-
a op b op c op d
|
| 41 |
-
```
|
| 42 |
-
|
| 43 |
-
where:
|
| 44 |
-
|
| 45 |
-
```text
|
| 46 |
-
op = +, -, *, /
|
| 47 |
-
```
|
| 48 |
-
|
| 49 |
-
The goal is not to make a general chatbot. The goal is to train a compact model that can learn arithmetic patterns, operator priority, parentheses, and numerical continuation with very few parameters.
|
| 50 |
-
|
| 51 |
-
|
| 52 |
## Scores
|
| 53 |
|
| 54 |
<div align="center">
|
|
@@ -65,7 +48,7 @@ The goal is not to make a general chatbot. The goal is to train a compact model
|
|
| 65 |
<td align="center"><strong>82.08%</strong></td>
|
| 66 |
</tr>
|
| 67 |
<tr>
|
| 68 |
-
<td align="center"><code>
|
| 69 |
<td align="center">31.70M</td>
|
| 70 |
<td align="center"><strong>78.60%</strong></td>
|
| 71 |
</tr>
|
|
@@ -108,6 +91,23 @@ The goal is not to make a general chatbot. The goal is to train a compact model
|
|
| 108 |
|
| 109 |
</div>
|
| 110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
## Calculation Patterns
|
| 112 |
|
| 113 |
### 1. Single operation
|
|
|
|
| 32 |
|
| 33 |

|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
## Scores
|
| 36 |
|
| 37 |
<div align="center">
|
|
|
|
| 48 |
<td align="center"><strong>82.08%</strong></td>
|
| 49 |
</tr>
|
| 50 |
<tr>
|
| 51 |
+
<td align="center"><code>PhysiQuanty/Arithmetic-SLM</code></td>
|
| 52 |
<td align="center">31.70M</td>
|
| 53 |
<td align="center"><strong>78.60%</strong></td>
|
| 54 |
</tr>
|
|
|
|
| 91 |
|
| 92 |
</div>
|
| 93 |
|
| 94 |
+
# Arithmetic-SLM
|
| 95 |
+
|
| 96 |
+
Arithmetic-SLM is a small language model specialized for arithmetic continuation. It is designed to be highly efficient on numerical operations with mostly two-digit numbers in patterns such as:
|
| 97 |
+
|
| 98 |
+
```text
|
| 99 |
+
a op b op c op d
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
where:
|
| 103 |
+
|
| 104 |
+
```text
|
| 105 |
+
op = +, -, *, /
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
The goal is not to make a general chatbot. The goal is to train a compact model that can learn arithmetic patterns, operator priority, parentheses, and numerical continuation with very few parameters.
|
| 109 |
+
|
| 110 |
+
|
| 111 |
## Calculation Patterns
|
| 112 |
|
| 113 |
### 1. Single operation
|