Instructions to use jdineen/olmo3-7b-pilot3-sft-math-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jdineen/olmo3-7b-pilot3-sft-math-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jdineen/olmo3-7b-pilot3-sft-math-code") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jdineen/olmo3-7b-pilot3-sft-math-code") model = AutoModelForCausalLM.from_pretrained("jdineen/olmo3-7b-pilot3-sft-math-code", device_map="auto") 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 jdineen/olmo3-7b-pilot3-sft-math-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jdineen/olmo3-7b-pilot3-sft-math-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jdineen/olmo3-7b-pilot3-sft-math-code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jdineen/olmo3-7b-pilot3-sft-math-code
- SGLang
How to use jdineen/olmo3-7b-pilot3-sft-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 "jdineen/olmo3-7b-pilot3-sft-math-code" \ --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": "jdineen/olmo3-7b-pilot3-sft-math-code", "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 "jdineen/olmo3-7b-pilot3-sft-math-code" \ --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": "jdineen/olmo3-7b-pilot3-sft-math-code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jdineen/olmo3-7b-pilot3-sft-math-code with Docker Model Runner:
docker model run hf.co/jdineen/olmo3-7b-pilot3-sft-math-code
| {%- for message in messages -%}{%- if message['role'] == 'system' -%}{{- '<|im_start|>system | |
| ' + message['content'] -}}{%- if tools is not none -%}{{- '<functions>' -}}{{- tools | tojson -}}{{- '</functions>' -}}{%- elif message.get('functions', none) is not none -%}{{- ' <functions>' + message['functions'] + '</functions>' -}}{%- endif -%}{{- '<|im_end|> | |
| ' -}}{%- elif message['role'] == 'user' -%}{{- '<|im_start|>user | |
| ' + message['content'] + '<|im_end|> | |
| ' -}}{%- elif message['role'] == 'assistant' -%}{{- '<|im_start|>assistant | |
| ' -}}{%- generation -%}{%- 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>' -}}{%- elif message.get('tool_calls', none) is not none -%}{{- '<function_calls>' -}}{%- for tool_call in message['tool_calls'] -%}{%- if tool_call is mapping and tool_call.get('function', none) is not none -%}{%- set args = tool_call['function']['arguments'] -%}{%- set ns = namespace(arguments_list=[]) -%}{%- for key, value in args.items() -%}{%- set ns.arguments_list = ns.arguments_list + [key ~ '=' ~ (value | tojson)] -%}{%- endfor -%}{%- set arguments = ns.arguments_list | join(', ') -%}{{- tool_call['function']['name'] + '(' + arguments + ')' -}}{%- if not loop.last -%}{{ ' | |
| ' }}{%- endif -%}{%- else -%}{{- tool_call -}}{%- endif -%}{%- endfor -%}{{- '</function_calls>' -}}{%- endif -%}{%- if not loop.last -%}{{- '<|im_end|> | |
| ' -}}{%- else -%}{{- eos_token -}}{%- endif -%}{%- endgeneration -%}{%- elif message['role'] == 'environment' -%}{{- '<|im_start|>environment | |
| ' + message['content'] + '<|im_end|> | |
| ' -}}{%- elif message['role'] == 'tool' -%}{{- '<|im_start|>environment | |
| ' + message['content'] + '<|im_end|> | |
| ' -}}{%- endif -%}{%- endfor -%} |