Text Generation
Transformers
Safetensors
English
math
arithmetic
reasoning
grpo
small-language-model
from-scratch
Instructions to use arpjw/Microreason-43M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arpjw/Microreason-43M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arpjw/Microreason-43M")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("arpjw/Microreason-43M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arpjw/Microreason-43M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arpjw/Microreason-43M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arpjw/Microreason-43M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arpjw/Microreason-43M
- SGLang
How to use arpjw/Microreason-43M 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 "arpjw/Microreason-43M" \ --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": "arpjw/Microreason-43M", "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 "arpjw/Microreason-43M" \ --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": "arpjw/Microreason-43M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arpjw/Microreason-43M with Docker Model Runner:
docker model run hf.co/arpjw/Microreason-43M
Download extra-sft/config.json from arpjw/Microreason-43M: direct link, hf CLI and curl.
- Browser
- Download file 647 Bytes
-
https://huggingface.co/arpjw/Microreason-43M/resolve/main/extra-sft/config.json
- Command line
-
hf download hf://arpjw/Microreason-43M/extra-sft/config.json
-
curl -L -o config.json https://huggingface.co/arpjw/Microreason-43M/resolve/main/extra-sft/config.json
647 Bytes
| { | |
| "architectures": [ | |
| "MicroReasonForCausalLM" | |
| ], | |
| "bos_token_id": 1, | |
| "d_model": 512, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "head_dim": 64, | |
| "init_std": 0.02, | |
| "max_seq_len": 2048, | |
| "mlp_hidden": 1408, | |
| "model_type": "microreason", | |
| "n_heads": 8, | |
| "n_kv_heads": 8, | |
| "n_layers": 12, | |
| "name": "microreason-43m", | |
| "norm_eps": 1e-05, | |
| "pad_token_id": 0, | |
| "rope_theta": 10000.0, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.22.2", | |
| "vocab_size": 8192, | |
| "auto_map": { | |
| "AutoConfig": "modeling_microreason.MicroReasonConfig", | |
| "AutoModelForCausalLM": "modeling_microreason.MicroReasonForCausalLM" | |
| } | |
| } |