Instructions to use open-r1/OlympicCoder-32B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use open-r1/OlympicCoder-32B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="open-r1/OlympicCoder-32B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("open-r1/OlympicCoder-32B") model = AutoModelForCausalLM.from_pretrained("open-r1/OlympicCoder-32B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use open-r1/OlympicCoder-32B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "open-r1/OlympicCoder-32B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "open-r1/OlympicCoder-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/open-r1/OlympicCoder-32B
- SGLang
How to use open-r1/OlympicCoder-32B 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 "open-r1/OlympicCoder-32B" \ --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": "open-r1/OlympicCoder-32B", "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 "open-r1/OlympicCoder-32B" \ --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": "open-r1/OlympicCoder-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use open-r1/OlympicCoder-32B with Docker Model Runner:
docker model run hf.co/open-r1/OlympicCoder-32B
Upload Qwen2ForCausalLM
Browse files- config.json +2 -2
- model-00001-of-00014.safetensors +3 -0
- model-00002-of-00014.safetensors +3 -0
- model-00003-of-00014.safetensors +3 -0
- model-00004-of-00014.safetensors +3 -0
- model-00005-of-00014.safetensors +3 -0
- model-00006-of-00014.safetensors +3 -0
- model-00007-of-00014.safetensors +3 -0
- model-00008-of-00014.safetensors +3 -0
- model-00009-of-00014.safetensors +3 -0
- model-00010-of-00014.safetensors +3 -0
- model-00011-of-00014.safetensors +3 -0
- model-00012-of-00014.safetensors +3 -0
- model-00013-of-00014.safetensors +3 -0
- model-00014-of-00014.safetensors +3 -0
- model.safetensors.index.json +0 -0
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"Qwen2ForCausalLM"
|
| 5 |
],
|
|
@@ -21,7 +21,7 @@
|
|
| 21 |
"rope_theta": 1000000.0,
|
| 22 |
"sliding_window": 131072,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
-
"torch_dtype": "
|
| 25 |
"transformers_version": "4.49.0",
|
| 26 |
"use_cache": false,
|
| 27 |
"use_sliding_window": false,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "open-r1/OlympicCoder-32B",
|
| 3 |
"architectures": [
|
| 4 |
"Qwen2ForCausalLM"
|
| 5 |
],
|
|
|
|
| 21 |
"rope_theta": 1000000.0,
|
| 22 |
"sliding_window": 131072,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
+
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.49.0",
|
| 26 |
"use_cache": false,
|
| 27 |
"use_sliding_window": false,
|
model-00001-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d3493882fabd2be598cc56d7231c9f105d5dab8aae62bd6bd21d3d660c64b5c
|
| 3 |
+
size 4891730992
|
model-00002-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b830adbcaea4fdd8dfc2f9c7ccb28dce48326fa1de79469220d22f2ec50ebbc
|
| 3 |
+
size 4876059352
|
model-00003-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf55317725b17b077187b4dc7fb5c89dd20df5cfb0effa767e1faa4688066297
|
| 3 |
+
size 4876059384
|
model-00004-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:475ef131c2d4f4b5833cd6252292e8b134f9c6977ce58288b1d0b8731f2d2221
|
| 3 |
+
size 4876059416
|
model-00005-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31b124a6920b481ee6bdc09ccd435950f56a083859d192d030910ace643f4fcb
|
| 3 |
+
size 4876059416
|
model-00006-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f5059504cc65235565dc007223f2935b6d464bad70e55bab6a0aa9cea793af4
|
| 3 |
+
size 4876059416
|
model-00007-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b053169deb078a7e09a0c866643798a10fae8bfcd6a14fbaedcedfca83236fe0
|
| 3 |
+
size 4876059416
|
model-00008-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb4d6364d7f0bf3398ed259040421cba118b0305e093c98eff1bf63db19fd95e
|
| 3 |
+
size 4876059416
|
model-00009-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f19b0d43fc6cf3e99d4eb82b4216fd48a55d52252aa1a5cb63d2778ae5dc24da
|
| 3 |
+
size 4876059416
|
model-00010-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61990bebe3882a9abe975d50c22521c9cff5f6487d12537fefe6980455cc83ea
|
| 3 |
+
size 4876059416
|
model-00011-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b22b2d1fae8ea110f5a0cef37483a5a29e9a16fedd61ee2365418b18cd1a4f0
|
| 3 |
+
size 4876059416
|
model-00012-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5812afb3c74014c19eae2831a1ebdc79e1fb6b8d726e21ef8da477ab31a84cd8
|
| 3 |
+
size 4876059416
|
model-00013-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e55ce6719a54783f7b900468e2712279311d674e50650650f326d043dbf19cf
|
| 3 |
+
size 4876059416
|
model-00014-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:40dc97607a6a4c9cb760635f91a3811b5ef5f0eb49c48a0c3a83ae5072b2e094
|
| 3 |
+
size 2123397800
|
model.safetensors.index.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|