Text Generation
Transformers
Safetensors
llama
alignment-handbook
Generated from Trainer
conversational
text-generation-inference
Instructions to use AI-MO/NuminaMath-7B-TIR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AI-MO/NuminaMath-7B-TIR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AI-MO/NuminaMath-7B-TIR") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AI-MO/NuminaMath-7B-TIR") model = AutoModelForCausalLM.from_pretrained("AI-MO/NuminaMath-7B-TIR") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AI-MO/NuminaMath-7B-TIR with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AI-MO/NuminaMath-7B-TIR" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AI-MO/NuminaMath-7B-TIR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AI-MO/NuminaMath-7B-TIR
- SGLang
How to use AI-MO/NuminaMath-7B-TIR 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 "AI-MO/NuminaMath-7B-TIR" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AI-MO/NuminaMath-7B-TIR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "AI-MO/NuminaMath-7B-TIR" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AI-MO/NuminaMath-7B-TIR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AI-MO/NuminaMath-7B-TIR with Docker Model Runner:
docker model run hf.co/AI-MO/NuminaMath-7B-TIR
add AIBOM
#13
by RiccardoDav - opened
- AI-MO_NuminaMath-7B-TIR.json +71 -0
AI-MO_NuminaMath-7B-TIR.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bomFormat": "CycloneDX",
|
| 3 |
+
"specVersion": "1.6",
|
| 4 |
+
"serialNumber": "urn:uuid:6abaa880-fd87-409b-b3dd-f7017767e93d",
|
| 5 |
+
"version": 1,
|
| 6 |
+
"metadata": {
|
| 7 |
+
"timestamp": "2025-07-10T09:01:27.226304+00:00",
|
| 8 |
+
"component": {
|
| 9 |
+
"type": "machine-learning-model",
|
| 10 |
+
"bom-ref": "AI-MO/NuminaMath-7B-TIR-25bf135d-b699-508e-a81d-4ff4bb0efb1d",
|
| 11 |
+
"name": "AI-MO/NuminaMath-7B-TIR",
|
| 12 |
+
"externalReferences": [
|
| 13 |
+
{
|
| 14 |
+
"url": "https://huggingface.co/AI-MO/NuminaMath-7B-TIR",
|
| 15 |
+
"type": "documentation"
|
| 16 |
+
}
|
| 17 |
+
],
|
| 18 |
+
"modelCard": {
|
| 19 |
+
"modelParameters": {
|
| 20 |
+
"task": "text-generation",
|
| 21 |
+
"architectureFamily": "llama",
|
| 22 |
+
"modelArchitecture": "LlamaForCausalLM"
|
| 23 |
+
},
|
| 24 |
+
"properties": [
|
| 25 |
+
{
|
| 26 |
+
"name": "library_name",
|
| 27 |
+
"value": "transformers"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"name": "base_model",
|
| 31 |
+
"value": "deepseek-ai/deepseek-math-7b-base"
|
| 32 |
+
}
|
| 33 |
+
],
|
| 34 |
+
"consideration": {
|
| 35 |
+
"useCases": "Here's how you can run the model using the `pipeline()` function from \ud83e\udd17 Transformers:```pythonimport reimport torchfrom transformers import pipelinepipe = pipeline(\"text-generation\", model=\"AI-MO/NuminaMath-7B-TIR\", torch_dtype=torch.bfloat16, device_map=\"auto\")messages = [{\"role\": \"user\", \"content\": \"For how many values of the constant $k$ will the polynomial $x^{2}+kx+36$ have two distinct integer roots?\"},]prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)gen_config = {\"max_new_tokens\": 1024,\"do_sample\": False,\"stop_strings\": [\"```output\"], # Generate until Python code block is complete\"tokenizer\": pipe.tokenizer,}outputs = pipe(prompt, **gen_config)text = outputs[0][\"generated_text\"]print(text)"
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"authors": [
|
| 39 |
+
{
|
| 40 |
+
"name": "AI-MO"
|
| 41 |
+
}
|
| 42 |
+
],
|
| 43 |
+
"licenses": [
|
| 44 |
+
{
|
| 45 |
+
"license": {
|
| 46 |
+
"id": "Apache-2.0",
|
| 47 |
+
"url": "https://spdx.org/licenses/Apache-2.0.html"
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
],
|
| 51 |
+
"description": "- **Model type:** A 7B parameter math LLM fine-tuned in two stages of supervised fine-tuning, first on a dataset with math problem-solution pairs and then on a synthetic dataset with examples of multi-step generations using tool-integrated reasoning.- **Language(s) (NLP):** Primarily English- **License:** Apache 2.0- **Finetuned from model:** [deepseek-ai/deepseek-math-7b-base](https://huggingface.co/deepseek-ai/deepseek-math-7b-base)",
|
| 52 |
+
"tags": [
|
| 53 |
+
"transformers",
|
| 54 |
+
"safetensors",
|
| 55 |
+
"llama",
|
| 56 |
+
"text-generation",
|
| 57 |
+
"alignment-handbook",
|
| 58 |
+
"generated_from_trainer",
|
| 59 |
+
"conversational",
|
| 60 |
+
"arxiv:2309.17452",
|
| 61 |
+
"base_model:deepseek-ai/deepseek-math-7b-base",
|
| 62 |
+
"base_model:finetune:deepseek-ai/deepseek-math-7b-base",
|
| 63 |
+
"license:apache-2.0",
|
| 64 |
+
"autotrain_compatible",
|
| 65 |
+
"text-generation-inference",
|
| 66 |
+
"endpoints_compatible",
|
| 67 |
+
"region:us"
|
| 68 |
+
]
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
}
|