--- license: apache-2.0 license_link: https://huggingface.co/Apexintelligence-AI/Apex-35B-V1.0/blob/main/LICENSE library_name: transformers pipeline_tag: text-generation base_model: Qwen/Qwen3.6-35B-A3B base_model_relation: finetune tags: - mixture-of-experts - agent - research ---
Apex Intelligence

Homepage: Apex Intelligence GitHub: Apex-35B-V1.0 Hugging Face: Apexintelligence-AI
Blog: Apex-35B-V1.0 GGUF: BF16 + 28 quantizations Twitter: apexin_ai License: Apache 2.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**](https://github.com/anthropics/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](https://huggingface.co/Qwen/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. GGUF builds for llama.cpp, Unsloth, and other local runtimes are available in [Apex-35B-V1.0-GGUF](https://huggingface.co/Apexintelligence-AI/Apex-35B-V1.0-GGUF): BF16 and 28 quantizations, from Q8_0 (37.8 GB) to IQ1_S (9.0 GB). ### 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.

Apex-35B-V1.0 evaluation overview

### 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
FrontierScience40.021.75.030.750.061.7
ASI-Bench22.516.317.533.137.438.9
BioMysteryBench
Human-solvable
76.753.449.385.687.786.3
BioMysteryBench
Human-difficult
35.311.85.939.141.229.4
PaperBench60.945.829.342.581.887.1
Agentic Tasks
BrowseComp69.442.123.280.981.090.5
WideSearch69.960.948.378.481.179.8
BFCL V484.075.265.475.873.975.0
AutomationBench49.310.09.850.248.860.5
APEX-Agents64.641.733.868.273.374.2
Agents’ Last Exam
(ALE)
19.112.419.128.526.335.4
Coding
Terminal-Bench 2.165.246.159.689.984.390.6
SWE-bench Pro v292.472.485.295.894.797.5
SWE-bench Verified
No Internet
73.463.874.879.872.282.0
LiveCodeBench v682.384.585.178.375.395.7
SWE-Atlas QnA33.112.116.148.745.250.8
Reasoning
MMLU-Pro87.279.070.888.285.568.3
AA-LCR77.074.059.080.079.087.0
HLE47.236.218.261.355.342.6
GPQA Diamond83.375.866.288.484.990.9
Internal Benchmarks
RoboRSI44.535.030.058.452.474.7
Real2Sim21.62.12.325.621.436.3
CFD-Bench
Wins / Draws / Losses
vs. Qwen3.6-35B-A3B
79 / 0 / 21N/A54 / 2 / 4499 / 0 / 198 / 0 / 2100 / 0 / 0
## Model Summary
ArchitectureSparse mixture-of-experts (MoE)
Parameters35B total · 3B active per token
Context Length262,144 tokens (input + output)
Input / OutputText / Text
Thinking ModeDynamic
Weight PrecisionBF16
## Deployment ### Download Model
ModelDownloadParametersFormat
Apex-35B-V1.0🤗 Hugging Face35B in total, 3B activatedBF16 safetensors (about 72 GB)
Apex-35B-V1.0-GGUF🤗 Hugging Face35B in total, 3B activatedBF16 (71.1 GB, 2 files)
Q8_0 (37.8 GB)
Q6_K_L (32.8 GB), Q6_K_S (29.9 GB), Q6_K (29.2 GB)
Q5_K_S (25.6 GB), Q5_K_M (25.3 GB)
Q4_K_L (24.6 GB), IQ4_NL (22.8 GB), Q4_1 (22.4 GB), Q4_K_M (21.7 GB), Q4_K_S (21.4 GB), Q4_0 (20.4 GB), IQ4_XS (20.4 GB), MXFP4_MOE (20.3 GB)
IQ3_M (19.4 GB), Q3_K_L (18.7 GB), IQ3_S (18.1 GB), Q3_K_M (17.8 GB), IQ3_XS (16.8 GB), Q3_K_S (16.8 GB), IQ3_XXS (16.1 GB)
Q2_K (14.3 GB), IQ2_M (13.7 GB), IQ2_S (12.5 GB), IQ2_XS (11.7 GB), IQ2_XXS (11.3 GB)
IQ1_M (9.9 GB), IQ1_S (9.0 GB)
```bash 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. > [!Important] > 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 ``. > [!Important] > 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. > [!Note] > 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. > [!Tip] > Install each framework in its own virtual environment. We tested with Python 3.12 (all frameworks) and 3.13 (vLLM and TokenSpeed), for example: > ```bash > uv venv --python 3.12 --seed .venv-sglang && source .venv-sglang/bin/activate > ``` > `--seed` adds `pip` to the environment. Both the `pip install` and the `uv pip install` commands below install into the active environment. #### SGLang [SGLang](https://github.com/sgl-project/sglang) `>=0.5.22` is recommended: ```bash uv pip install "sglang[all]>=0.5.22" ``` - **Standard launch:** ```bash 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 ``` - **Multi-Token Prediction (MTP):** ```bash 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](https://github.com/vllm-project/vllm) `>=0.32.0` is recommended: ```bash uv pip install "vllm>=0.32.0" --torch-backend=auto ``` - **Standard launch:** ```bash 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 ``` - **Multi-Token Prediction (MTP):** ```bash 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](https://github.com/lightseekorg/tokenspeed) supports NVIDIA Hopper and Blackwell GPUs with CUDA 13. Install the tested nightly build: ```bash 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:** ```bash 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 ``` - **Multi-Token Prediction (MTP):** ```bash 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](https://github.com/kvcache-ai/ktransformers) runs the experts on the CPU and the rest of the model on the GPU. Install it as described in its [deployment guide](https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/Qwen3.5.md), download the weights to a local directory, and add the reasoning and tool-call parsers to the launch command: ```bash 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: ```bash 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](https://github.com/huggingface/transformers) includes a lightweight server for quick tests: ```bash 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 for llama.cpp, Unsloth, and other local runtimes are in [Apex-35B-V1.0-GGUF](https://huggingface.co/Apexintelligence-AI/Apex-35B-V1.0-GGUF); the [Download Model](#download-model) table lists all files. For example, with a recent [llama.cpp](https://github.com/ggml-org/llama.cpp) build (`llama-server` on `PATH`): ```bash 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](https://huggingface.co/Apexintelligence-AI/Apex-35B-V1.0-GGUF). ### 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: ```bash pip install -U openai # Set the following accordingly export OPENAI_BASE_URL="http://localhost:8000/v1" export OPENAI_API_KEY="EMPTY" ``` > [!Tip] > We recommend `temperature=1.0`, `top_p=0.95`, `top_k=20`, and `max_tokens=65536` (the output budget includes the thinking). The first three values are also the defaults in `generation_config.json`. > [!Important] > Apex-35B-V1.0 decides on each turn whether to think and for how long. The thinking is returned in `reasoning_content` (`reasoning` in vLLM) and the answer in `content`. For multi-turn conversations and tool calls, append the complete assistant message to `messages`, for example with `msg.model_dump(exclude_none=True)`, and pass `extra_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 the `metadata` field; it does not change the result. #### Chat ```python 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`: ```python 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](https://huggingface.co/Apexintelligence-AI/Apex-35B-V1.0/blob/main/LICENSE). ## Contact If you have any questions, please reach out at [contact@apexin.ai](mailto:contact@apexin.ai).