Instructions to use allenai/Olmo-3-7B-RL-Zero-General with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/Olmo-3-7B-RL-Zero-General with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="allenai/Olmo-3-7B-RL-Zero-General") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("allenai/Olmo-3-7B-RL-Zero-General") model = AutoModelForCausalLM.from_pretrained("allenai/Olmo-3-7B-RL-Zero-General") 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 allenai/Olmo-3-7B-RL-Zero-General with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "allenai/Olmo-3-7B-RL-Zero-General" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "allenai/Olmo-3-7B-RL-Zero-General", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/allenai/Olmo-3-7B-RL-Zero-General
- SGLang
How to use allenai/Olmo-3-7B-RL-Zero-General 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 "allenai/Olmo-3-7B-RL-Zero-General" \ --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": "allenai/Olmo-3-7B-RL-Zero-General", "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 "allenai/Olmo-3-7B-RL-Zero-General" \ --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": "allenai/Olmo-3-7B-RL-Zero-General", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use allenai/Olmo-3-7B-RL-Zero-General with Docker Model Runner:
docker model run hf.co/allenai/Olmo-3-7B-RL-Zero-General
Update config.json on branch main
Browse files- config.json +6 -5
config.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
-
"
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
|
|
|
| 7 |
"eos_token_id": 100257,
|
| 8 |
"hidden_act": "silu",
|
| 9 |
"hidden_size": 4096,
|
|
@@ -44,7 +45,7 @@
|
|
| 44 |
"full_attention"
|
| 45 |
],
|
| 46 |
"max_position_embeddings": 65536,
|
| 47 |
-
"model_type": "
|
| 48 |
"num_attention_heads": 32,
|
| 49 |
"num_hidden_layers": 32,
|
| 50 |
"num_key_value_heads": 32,
|
|
@@ -61,8 +62,8 @@
|
|
| 61 |
"rope_theta": 500000,
|
| 62 |
"sliding_window": 4096,
|
| 63 |
"tie_word_embeddings": false,
|
| 64 |
-
"
|
| 65 |
-
"
|
| 66 |
-
"use_cache": false,
|
| 67 |
"vocab_size": 100278
|
| 68 |
}
|
|
|
|
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
+
"Olmo3ForCausalLM"
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
+
"dtype": "bfloat16",
|
| 8 |
"eos_token_id": 100257,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 4096,
|
|
|
|
| 45 |
"full_attention"
|
| 46 |
],
|
| 47 |
"max_position_embeddings": 65536,
|
| 48 |
+
"model_type": "olmo3",
|
| 49 |
"num_attention_heads": 32,
|
| 50 |
"num_hidden_layers": 32,
|
| 51 |
"num_key_value_heads": 32,
|
|
|
|
| 62 |
"rope_theta": 500000,
|
| 63 |
"sliding_window": 4096,
|
| 64 |
"tie_word_embeddings": false,
|
| 65 |
+
"transformers_version": "4.57.0",
|
| 66 |
+
"use_cache": true,
|
|
|
|
| 67 |
"vocab_size": 100278
|
| 68 |
}
|
| 69 |
+
|