Instructions to use pmahdavi/Olmo-3-7B-RL-Zero-Math-Code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pmahdavi/Olmo-3-7B-RL-Zero-Math-Code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pmahdavi/Olmo-3-7B-RL-Zero-Math-Code")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pmahdavi/Olmo-3-7B-RL-Zero-Math-Code") model = AutoModelForCausalLM.from_pretrained("pmahdavi/Olmo-3-7B-RL-Zero-Math-Code") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use pmahdavi/Olmo-3-7B-RL-Zero-Math-Code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pmahdavi/Olmo-3-7B-RL-Zero-Math-Code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pmahdavi/Olmo-3-7B-RL-Zero-Math-Code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pmahdavi/Olmo-3-7B-RL-Zero-Math-Code
- SGLang
How to use pmahdavi/Olmo-3-7B-RL-Zero-Math-Code 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 "pmahdavi/Olmo-3-7B-RL-Zero-Math-Code" \ --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": "pmahdavi/Olmo-3-7B-RL-Zero-Math-Code", "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 "pmahdavi/Olmo-3-7B-RL-Zero-Math-Code" \ --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": "pmahdavi/Olmo-3-7B-RL-Zero-Math-Code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use pmahdavi/Olmo-3-7B-RL-Zero-Math-Code with Docker Model Runner:
docker model run hf.co/pmahdavi/Olmo-3-7B-RL-Zero-Math-Code
Delete chat_template.jinja
Browse files- chat_template.jinja +0 -16
chat_template.jinja
DELETED
|
@@ -1,16 +0,0 @@
|
|
| 1 |
-
{% set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 %}{% if not has_system %}{{ '<|im_start|>system
|
| 2 |
-
You are OLMo, a helpful function-calling AI assistant built by Ai2. Your date cutoff is November 2024, and your model weights are available at https://huggingface.co/allenai. You do not currently have access to any functions. <functions></functions><|im_end|>
|
| 3 |
-
' }}{% endif %}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|im_start|>system
|
| 4 |
-
' + message['content'] }}{% if message.get('functions', none) is not none %}{{ ' <functions>' + message['functions'] + '</functions><|im_end|>
|
| 5 |
-
' }}{% else %}{{ ' You do not currently have access to any functions. <functions></functions><|im_end|>
|
| 6 |
-
' }}{% endif %}{% elif message['role'] == 'user' %}{% if message.get('functions', none) is not none %}{{ '<|im_start|>user
|
| 7 |
-
' + message['content'] + '
|
| 8 |
-
' + '<functions>' + message['functions'] + '</functions><|im_end|>
|
| 9 |
-
' }}{% else %}{{ '<|im_start|>user
|
| 10 |
-
' + message['content'] + '<|im_end|>
|
| 11 |
-
' }}{% endif %}{% elif message['role'] == 'assistant' %}{{ '<|im_start|>assistant
|
| 12 |
-
' }}{% if message.get('content', none) is not none %}{{ message['content'] }}{% endif %}{% if message.get('function_calls', none) is not none %}{{ '<function_calls>' + message['function_calls'] + '</function_calls>' }}{% endif %}{% if not loop.last %}{{ '<|im_end|>' + '
|
| 13 |
-
' }}{% else %}{{ eos_token }}{% endif %}{% elif message['role'] == 'environment' %}{{ '<|im_start|>environment
|
| 14 |
-
' + message['content'] + '<|im_end|>
|
| 15 |
-
' }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|im_start|>assistant
|
| 16 |
-
<think>' }}{% endif %}{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|