Instructions to use Apexintelligence-AI/Apex-35B-V1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Apexintelligence-AI/Apex-35B-V1.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Apexintelligence-AI/Apex-35B-V1.0") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Apexintelligence-AI/Apex-35B-V1.0") model = AutoModelForMultimodalLM.from_pretrained("Apexintelligence-AI/Apex-35B-V1.0", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Apexintelligence-AI/Apex-35B-V1.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Apexintelligence-AI/Apex-35B-V1.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Apexintelligence-AI/Apex-35B-V1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Apexintelligence-AI/Apex-35B-V1.0
- SGLang
How to use Apexintelligence-AI/Apex-35B-V1.0 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 "Apexintelligence-AI/Apex-35B-V1.0" \ --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": "Apexintelligence-AI/Apex-35B-V1.0", "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 "Apexintelligence-AI/Apex-35B-V1.0" \ --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": "Apexintelligence-AI/Apex-35B-V1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Apexintelligence-AI/Apex-35B-V1.0 with Docker Model Runner:
docker model run hf.co/Apexintelligence-AI/Apex-35B-V1.0
Model Introduction
Apex-35B-V1.0 is the first model from Apex Intelligence, developed for both general-purpose use and research and supported by the Claude Code (v2.1.280 preferred) harness. It combines coding, tool use, question answering, and deep search with research tasks in AI, computational science, and robotics simulation.
Built on Qwen3.6-35B-A3B, the model is further trained on proprietary datasets and research trajectories. Its development incorporates recursive self-improvement (RSI) through Apex Research, an automated research system that contributes to training-data construction, automated experiments, training-recipe exploration, GPU kernel optimization, and inference optimization. Validated results from this process feed into subsequent development.
Key Features
- General and research capabilities. Covers everyday coding, question answering, search, and agentic tasks, alongside scientific and engineering research workflows.
- Research through computation and feedback. Plans computations, writes and runs programs, and uses results or execution feedback to revise its approach, including in fluid dynamics and robotics simulation.
- Self-improving development. Apex Research generated training data for the model's weak areas, refined the training recipe based on experimental feedback, and optimized the training and inference infrastructure.
- Dynamic thinking. Determines whether to reason and how long to reason on each turn, without manual mode switching.
- Sparse architecture and long context. Uses 35B total parameters with approximately 3B activated per token, and a context window of 262,144 tokens shared by input and output, supporting large code repositories and long multi-turn tool interactions.
Evaluation Results
Performance Overview
The chart below summarizes performance across four task categories and three internal benchmarks. Apex-35B-V1.0 is highlighted in blue.
- Category averages: Research, Agentic Tasks, Coding, and Reasoning show weighted averages of the benchmark scores within each category.
- Internal benchmarks: RoboRSI and Real2Sim show individual benchmark scores; CFD-Bench shows wins, draws, and losses against Qwen3.6-35B-A3B.
Detailed Benchmark Results
The table below provides the per-benchmark breakdown, grouped by task category, followed by the three internal benchmarks.
- SciCode: The two scores are Main Problem / Subproblem, in that order.
- CFD-Bench: Values are Wins / Draws / Losses against Qwen3.6-35B-A3B. N/A marks the baseline model for this comparison.
| Benchmark | Apex-35B V1.0 ยท Ours 35B |
Qwen3.6 35B-A3B 35B |
Recursive Flint 39.8B |
GLM 5.3 753B |
GLM 5.3-Flash 320B |
DeepSeek V4.1-Flash-1017 552B + 196B |
|---|---|---|---|---|---|---|
| Research | ||||||
| SciCode Main Problem / Subproblem | 62.6 / 75.6 | 37.5 / 60.6 | 26.6 / 46.0 | 79.2 / 91.3 | 76.6 / 86.8 | 68.8 / 81.9 |
| FrontierScience | 40.0 | 21.7 | 5.0 | 30.7 | 50.0 | 61.7 |
| ASI-Bench | 22.5 | 16.3 | 17.5 | 33.1 | 37.4 | 38.9 |
| BioMysteryBench Human-solvable | 76.7 | 53.4 | 49.3 | 85.6 | 87.7 | 86.3 |
| BioMysteryBench Human-difficult | 35.3 | 11.8 | 5.9 | 39.1 | 41.2 | 29.4 |
| PaperBench | 60.9 | 45.8 | 29.3 | 42.5 | 81.8 | 87.1 |
| Agentic Tasks | ||||||
| BrowseComp | 69.4 | 42.1 | 23.2 | 80.9 | 81.0 | 90.5 |
| WideSearch | 69.9 | 60.9 | 48.3 | 78.4 | 81.1 | 79.8 |
| BFCL V4 | 84.0 | 75.2 | 65.4 | 75.8 | 73.9 | 75.0 |
| AutomationBench | 49.3 | 10.0 | 9.8 | 50.2 | 48.8 | 60.5 |
| APEX-Agents | 64.6 | 41.7 | 33.8 | 68.2 | 73.3 | 74.2 |
| Agentsโ Last Exam (ALE) | 19.1 | 12.4 | 19.1 | 28.5 | 26.3 | 35.4 |
| Coding | ||||||
| Terminal-Bench 2.1 | 65.2 | 46.1 | 59.6 | 89.9 | 84.3 | 90.6 |
| SWE-bench Pro v2 | 92.4 | 72.4 | 85.2 | 95.8 | 94.7 | 97.5 |
| SWE-bench Verified No Internet | 73.4 | 63.8 | 74.8 | 79.8 | 72.2 | 82.0 |
| LiveCodeBench v6 | 82.3 | 84.5 | 85.1 | 78.3 | 75.3 | 95.7 |
| SWE-Atlas QnA | 33.1 | 12.1 | 16.1 | 48.7 | 45.2 | 50.8 |
| Reasoning | ||||||
| MMLU-Pro | 87.2 | 79.0 | 70.8 | 88.2 | 85.5 | 68.3 |
| AA-LCR | 77.0 | 74.0 | 59.0 | 80.0 | 79.0 | 87.0 |
| HLE | 47.2 | 36.2 | 18.2 | 61.3 | 55.3 | 42.6 |
| GPQA Diamond | 83.3 | 75.8 | 66.2 | 88.4 | 84.9 | 90.9 |
| Internal Benchmarks | ||||||
| RoboRSI | 44.5 | 35.0 | 30.0 | 58.4 | 52.4 | 74.7 |
| Real2Sim | 21.6 | 2.1 | 2.3 | 25.6 | 21.4 | 36.3 |
| CFD-Bench Wins / Draws / Losses vs. Qwen3.6-35B-A3B | 79 / 0 / 21 | N/A | 54 / 2 / 44 | 99 / 0 / 1 | 98 / 0 / 2 | 100 / 0 / 0 |
Model Summary
| Architecture | Sparse mixture-of-experts (MoE) |
|---|---|
| Parameters | 35B total ยท 3B active per token |
| Context Length | 262,144 tokens (input + output) |
| Input / Output | Text / Text |
| Thinking Mode | Dynamic |
| Weight Precision | BF16 |
Deployment
Download Model
| Model | Download | Parameters | Format |
|---|---|---|---|
| Apex-35B-V1.0 | ๐ค Hugging Face | 35B in total, 3B activated | BF16 safetensors (about 72 GB) |
| Apex-35B-V1.0-GGUF | ๐ค Hugging Face | 35B in total, 3B activated | GGUF: BF16, Q8_0, Q6_K, Q5_K_M, Q4_K_M |
pip install -U huggingface_hub # provides the hf command
hf download Apexintelligence-AI/Apex-35B-V1.0 --local-dir Apex-35B-V1.0
Serving Apex-35B-V1.0
Apex-35B-V1.0 can be served with popular inference frameworks through an OpenAI-compatible API. The commands below start an endpoint at http://localhost:8000/v1 and, except for transformers serve and llama.cpp (see their sections), set the served model name to Apex-35B-V1.0, which the examples use as model. To use local weights, replace Apexintelligence-AI/Apex-35B-V1.0 with the local directory; the served model name stays the same.
The checkpoint includes its own chat template (
chat_template.jinja). Every framework below loads it automatically (llama.cpp with--jinja). Do not pass--chat-template, and do not replace it with the Qwen3.6 template: Apex-35B-V1.0 expects the generation prompt to end with<think>.
The model has a context length of 262,144 tokens, shared by input and output. The BF16 weights take about 72 GB. One GPU with 141 GB or more (for example H20-3e, H200, or B200) runs the model with tensor parallel size 1 and the full context. On H100 NVL (94 GB) we ran SGLang and vLLM with tensor parallel size 2, and TokenSpeed with tensor parallel size 1; on A100 (40 GB) we ran SGLang and vLLM with tensor parallel size 4. On other GPUs with less memory, increase the tensor parallel size. A shorter context saves little memory: the KV cache for the full 262,144 tokens takes about 5.4 GB.
The install commands below install CUDA 13 builds (PyTorch for SGLang and Transformers, and the vLLM wheel). We ran them with NVIDIA drivers 580 and 595. On a machine with 4 ร A100 40 GB and driver 570 (CUDA 12.8) we observed:
- vLLM started after reinstalling its CUDA 12.9 build:
uv pip install "vllm==0.32.0+cu129" --extra-index-url https://wheels.vllm.ai/0.32.0/cu129 --reinstall-package vllm.- SGLang and Transformers stopped with "The NVIDIA driver on your system is too old" and ran only after loading NVIDIA's CUDA 13 forward-compatibility package (
cuda-compat-13-0).- SGLang with MTP started, but its first request failed while FlashInfer compiled its kernels; we did not find a fix. We did not test driver 570 on Hopper or Blackwell GPUs.
Install each framework in its own virtual environment. We tested with Python 3.12 (all frameworks) and 3.13 (vLLM and TokenSpeed), for example:
uv venv --python 3.12 --seed .venv-sglang && source .venv-sglang/bin/activate
--seedaddspipto the environment. Both thepip installand theuv pip installcommands below install into the active environment.
SGLang
SGLang >=0.5.22 is recommended:
uv pip install "sglang[all]>=0.5.22"
Standard launch:
python -m sglang.launch_server --model-path Apexintelligence-AI/Apex-35B-V1.0 --served-model-name Apex-35B-V1.0 --port 8000 --tp-size 1 --context-length 262144 --reasoning-parser qwen3 --tool-call-parser qwen3_coderMulti-Token Prediction (MTP):
python -m sglang.launch_server --model-path Apexintelligence-AI/Apex-35B-V1.0 --served-model-name Apex-35B-V1.0 --port 8000 --tp-size 1 --context-length 262144 --reasoning-parser qwen3 --tool-call-parser qwen3_coder --speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4
The first request after startup can take about one minute; later requests are fast.
vLLM
vLLM >=0.32.0 is recommended:
uv pip install "vllm>=0.32.0" --torch-backend=auto
Standard launch:
vllm serve Apexintelligence-AI/Apex-35B-V1.0 --served-model-name Apex-35B-V1.0 --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coderMulti-Token Prediction (MTP):
vllm serve Apexintelligence-AI/Apex-35B-V1.0 --served-model-name Apex-35B-V1.0 --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder --speculative-config '{"method":"mtp","num_speculative_tokens":2}'
vLLM returns the thinking in the reasoning field instead of reasoning_content. The first start can download and compile kernels, which needs internet access and several minutes.
TokenSpeed
TokenSpeed supports NVIDIA Hopper and Blackwell GPUs with CUDA 13. Install the tested nightly build:
pip install "tokenspeed==0.1.1.post20261025" --extra-index-url https://lightseek.org/whl/nightly --extra-index-url https://lightseek.org/whl/nightly/cu130
Standard launch:
tokenspeed serve Apexintelligence-AI/Apex-35B-V1.0 --served-model-name Apex-35B-V1.0 --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 --tool-call-parser qwen_coderMulti-Token Prediction (MTP):
tokenspeed serve Apexintelligence-AI/Apex-35B-V1.0 --served-model-name Apex-35B-V1.0 --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 --tool-call-parser qwen_coder --speculative-algorithm MTP --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4
This is the nightly build we tested (2026-10-25); later builds may behave differently. The pin covers only the tokenspeed package; its dependencies come from the nightly index on the day you install. With uv pip install, add --index-strategy unsafe-best-match so that uv takes packages from both indexes. In TokenSpeed the tool-call parser is named qwen_coder, not qwen3_coder. Without the two parser flags, the thinking and the tool calls stay in content. The first start compiles kernels, which can take 15 to 25 minutes; later starts reuse the cache. During startup each GPU process used about 280 GiB (300 GB) of host memory in our tests, so tensor parallel size 2 needs about 560 GiB (600 GB) or more. On H100 NVL, tensor parallel size 2 stopped at startup with "an illegal memory access was encountered" in our test; tensor parallel size 1 on one H100 NVL worked.
KTransformers
KTransformers runs the experts on the CPU and the rest of the model on the GPU. Install it as described in its deployment guide, download the weights to a local directory, and add the reasoning and tool-call parsers to the launch command:
python -m sglang.launch_server --model /path/to/Apex-35B-V1.0 --kt-weight-path /path/to/Apex-35B-V1.0 --kt-cpuinfer 32 --kt-threadpool-count 2 --kt-num-gpu-experts 1 --kt-method BF16 --attention-backend triton --trust-remote-code --mem-fraction-static 0.9 --chunked-prefill-size 4096 --max-running-requests 8 --max-total-tokens 32000 --enable-mixed-chunk --tensor-parallel-size 1 --disable-shared-experts-fusion --reasoning-parser qwen3 --tool-call-parser qwen3_coder --served-model-name Apex-35B-V1.0 --port 8000
This command is based on the KTransformers guide, with the parsers, served model name and port added. --max-total-tokens 32000 limits the KV cache to about 32,000 tokens, so a request cannot use the 65,536-token output budget from the examples. For longer prompts and outputs, raise --max-total-tokens or lower max_tokens in the request.
With kt-kernel / sglang-kt 0.7.2 we also needed these packages:
pip install nvidia-cudnn-cu12==9.16.0.29
# Hopper and Ampere GPUs (tested: H20, H200, H100 NVL, A100):
pip install --no-deps sgl-kernel==0.3.21
# Blackwell GPUs (tested: B200); also add --moe-runner-backend triton to the launch command:
pip install ktransformers==0.7.2
Hugging Face Transformers
Transformers includes a lightweight server for quick tests:
pip install "transformers[serving]>=5.21.0" pillow torchvision
transformers serve Apexintelligence-AI/Apex-35B-V1.0 --port 8000
pillow and torchvision are needed to load the processor files shipped with the checkpoint. transformers serve has no served-model-name option: set model in the examples to the path or repository ID that you passed to it. It rejects the top_k request field, so remove it from extra_body. It does not pass the thinking of earlier turns back to the model; for multi-turn and agent use, prefer SGLang, vLLM, or TokenSpeed. If GET /v1/models returns HTTP 500 (CacheNotFound), create the hub folder under $HF_HOME; chat requests are not affected.
llama.cpp and Unsloth
GGUF builds (BF16, Q8_0, Q6_K, Q5_K_M, Q4_K_M) for llama.cpp, Unsloth, and other local runtimes are in Apex-35B-V1.0-GGUF. For example, with a recent llama.cpp build (llama-server on PATH):
hf download Apexintelligence-AI/Apex-35B-V1.0-GGUF Apex-35B-V1.0-Q4_K_M.gguf --local-dir .
llama-server -m Apex-35B-V1.0-Q4_K_M.gguf --jinja -ngl 99 -c 32768 --port 8000 --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0
--jinja is required: it applies the chat template embedded in the file. -c sets the context for the prompt and the output together; with -c 32768, a long thinking can be cut off before the 65,536-token budget of the examples, so raise -c if you have the memory. For Unsloth and the other files, see the GGUF model card.
Using Apex-35B-V1.0 via the Chat Completions API
The chat completions API is accessible through standard HTTP requests or the OpenAI SDK. Install the SDK in a separate environment from the server (SGLang 0.5.22 and sglang-kt 0.7.2 require openai==2.6.1; upgrading openai there breaks that requirement) and configure the endpoint:
pip install -U openai
# Set the following accordingly
export OPENAI_BASE_URL="http://localhost:8000/v1"
export OPENAI_API_KEY="EMPTY"
We recommend
temperature=1.0,top_p=0.95,top_k=20, andmax_tokens=65536(the output budget includes the thinking). The first three values are also the defaults ingeneration_config.json.
Apex-35B-V1.0 decides on each turn whether to think and for how long. The thinking is returned in
reasoning_content(reasoningin vLLM) and the answer incontent. For multi-turn conversations and tool calls, append the complete assistant message tomessages, for example withmsg.model_dump(exclude_none=True), and passextra_body={"chat_template_kwargs": {"preserve_thinking": True}}to keep the thinking of earlier turns. With SGLang,model_dump()can print a Pydantic serializer warning about themetadatafield; it does not change the result.
Chat
from openai import OpenAI
client = OpenAI() # reads OPENAI_BASE_URL and OPENAI_API_KEY
questions = [
"Water flows through a pipe with an inner diameter of 5 cm at a mean velocity of 2 m/s. Take the kinematic viscosity as 1.0ร10โปโถ mยฒ/s. "
"What is the Reynolds number, and is the flow laminar or turbulent? Please answer briefly.",
"What if the velocity drops to 2 cm/s?",
]
messages = []
for q in questions:
messages.append({"role": "user", "content": q})
resp = client.chat.completions.create(
model="Apex-35B-V1.0",
messages=messages,
temperature=1.0,
top_p=0.95,
max_tokens=65536,
extra_body={
"top_k": 20,
"chat_template_kwargs": {"preserve_thinking": True},
},
)
choice = resp.choices[0]
msg = choice.message
text = (msg.content or "").strip()
print("Q:", q)
if choice.finish_reason == "length" or not text:
print("A: (no complete answer: the output was cut off or empty)")
break
print("A:", text, "\n")
messages.append(msg.model_dump(exclude_none=True))
Tool Calling
The model calls tools in the Qwen XML format; the tool-call parser of each framework converts the calls into standard tool_calls. Return each tool result with role="tool" and its tool_call_id:
import json
from openai import OpenAI
client = OpenAI()
# kinematic viscosity at 20 ยฐC (mยฒ/s), approximate example values; glycerol means pure glycerol
VISCOSITY = {"water": 1.0e-6, "glycerol": 1.12e-3, "air": 1.5e-5}
def get_fluid_properties(fluid):
if fluid not in VISCOSITY:
return {"error": f"unknown fluid: {fluid}", "available": list(VISCOSITY)}
return {"fluid": fluid, "temperature_C": 20, "kinematic_viscosity_m2_s": VISCOSITY[fluid]}
tools = [{
"type": "function",
"function": {
"name": "get_fluid_properties",
"description": "Look up the kinematic viscosity of a fluid at 20 ยฐC",
"parameters": {
"type": "object",
"properties": {"fluid": {"type": "string", "enum": list(VISCOSITY)}},
"required": ["fluid"],
},
},
}]
messages = [{"role": "user", "content": (
"A pipe has an inner diameter of 5 cm and a mean flow velocity of 0.5 m/s. Is the flow laminar or turbulent "
"when it carries water at 20 ยฐC, and when it carries glycerol at 20 ยฐC? Use get_fluid_properties to look up "
"the kinematic viscosity, then compute the Reynolds numbers and explain briefly. Answer in plain text, without LaTeX."
)}]
for _ in range(8): # at most 8 model requests
resp = client.chat.completions.create(
model="Apex-35B-V1.0",
messages=messages,
tools=tools,
tool_choice="auto",
temperature=1.0,
top_p=0.95,
max_tokens=65536,
extra_body={"top_k": 20, "chat_template_kwargs": {"preserve_thinking": True}},
)
choice = resp.choices[0]
msg = choice.message
messages.append(msg.model_dump(exclude_none=True))
if choice.finish_reason == "length": # cut off: do not run partial tool calls
print("(no complete answer: the output was cut off)")
break
if not msg.tool_calls: # no tool call: require a nonempty final answer
text = (msg.content or "").strip()
if not text:
print("(no complete answer: the output was empty)")
else:
print(text)
break
for call in msg.tool_calls:
args = call.function.arguments
if call.function.name != "get_fluid_properties":
result = {"error": "unknown tool: " + call.function.name}
else:
try:
args = json.loads(args or "{}")
result = get_fluid_properties(**args)
except (json.JSONDecodeError, TypeError) as exc:
result = {"error": "invalid tool arguments: " + str(exc)}
print("[tool]", call.function.name, args, "->", result)
messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)})
else:
print("(reached the limit of 8 requests without a final answer)")
License
Apex-35B-V1.0, including its model weights, code examples, and documentation, is licensed under the Apache License 2.0.
Contact
If you have any questions, please reach out at contact@apexin.ai.
- Downloads last month
- -
