Get Started with Inkling-2-Small
Deploy Inkling-2-Small using the SGLang Model-Free NIM Experimental Collection. The collection provides a model-free container and a separate serving recipe resource. Supply the model weights at runtime and load the recipe for your GPU and topology. For the supported configurations, refer to Inkling-2-Small.
Inkling-2-Small is a sparse mixture-of-experts model with 594B total and 17B active parameters, published in NVFP4 precision. It accepts text and image input and returns text. Audio and video input are not supported.
Use container and recipe version 2.1.9-variant-inkling-2-small together.
A recipe may set engine options that another container version does not
support. The container does not include model weights. Download the
Thinking Machines checkpoint
separately, as shown below.
For the generic NIM LLM and VLM onboarding path, refer to Quickstart. For endpoint schemas, refer to API Reference.
Prerequisites
Before deploying the container, ensure your environment meets the following requirements:
Hardware Requirements
The following are the minimum required specifications for supported hardware components:
Software Requirements
Minimum required versions for supported software components.
Operating System
While other Linux distributions can be compatible with NIM, they have not been officially validated.
We recommend using Ubuntu 22.04 LTS or later for the best experience.
CUDA SDK
Install CUDA SDK by following the CUDA installation guide for Linux.
GPU Drivers
Install the NVIDIA GPU drivers by following the NVIDIA Driver Installation Guide.
Docker
Docker is required to run the containerized NIM services.
-
Install Docker Engine for your Linux distribution by following the Docker Engine installation guide.
-
Verify that the Docker daemon is running and that your user can execute
dockercommands withoutsudo. Add your user to thedockergroup if needed: -
Log out and back in for the group change to take effect.
Container Toolkit
The NVIDIA Container Toolkit enables Docker containers to access the host GPU.
-
Install the toolkit by following the NVIDIA Container Toolkit installation guide.
-
Configure Docker to use the NVIDIA runtime by following the Docker configuration steps.
-
Restart the Docker daemon after configuration:
NIM Container Access
To download and deploy NIM containers, you need one of the following:
- A free NVIDIA Developer Program membership.
- An NVIDIA AI Enterprise license. To request a free 90-day evaluation license, refer to Ways to Get Started With NVIDIA AI Enterprise and Activate Your NVIDIA AI Enterprise License.
Generate Access Credentials
NGC
An NGC Personal API key is not required to access most NVIDIA NIM containers and models hosted on NGC. An NGC API key is only required to download Production Branch (PB) models. This Get Started documentation uses a feature branch model as an example, so creating an NGC Personal API key is optional.
If you want to create an NGC Personal API key, do the following:
-
Generate the Personal API Key on the Setup API Keys page.
-
When creating the Personal API key, select at least NGC Catalog from the Services Included list. You can also include additional services if you want to use the same key for other purposes.
Legacy API keys are not supported by NIM. Always use a Personal API Key.
Hugging Face
Create a Hugging Face access token with read permissions (or higher, only if your org or private repos require it). This token allows model-free NIM to fetch models directly from Hugging Face.
Verify NVIDIA Runtime Access
To ensure that your setup is correct, run the following command:
This command should produce output similar to one of the following, where you can confirm CUDA driver version, and available GPUs.
In addition, this model has the following requirements:
- GPUs: Run each deployment on a single node whose GPUs are connected by NVLink. Use four B200 or GB200 GPUs, or eight H200, H20 (96 GB), or H20-3e GPUs. Data parallelism and pipeline parallelism are not supported for this model.
- Disk space: The NVFP4 checkpoint is approximately 394 GB (367 GiB). Provide at least 400 GB of free space for it, in addition to approximately 40 GB for the container image.
- NGC CLI: Install the NGC CLI to download the serving recipe.
- GB200 only: Configure an IMEX domain on the host that spans one tray with four GPUs.
Configure Authentication and Caching
The Hugging Face repository for this model is public, so a Hugging Face token is optional. Review the model’s license and acceptable use policy on Hugging Face before you download the weights.
Export a Hugging Face Access Token
Export a Hugging Face token to download models from Hugging Face.
-
Export the variable in your shell (temporary), replacing
<token-value>with your actual token: -
Optional: Persist the variable in your shell profile for future terminals.
If using bash:
If using zsh:
-
Verify the variable is set:
Export an NGC API Key
An NGC API key is only required to download Production Branch (PB) models. You can skip this section if you did not create an NGC API key.
-
Export the variable in your shell (temporary), replacing
<VALUE>with your actual API key: -
Optional: Persist the variable in your shell profile for future terminals.
If using bash:
If using zsh:
-
Verify the variable is set:
Model Cache
NIM downloads model weights to a cache on the host that you mount into the container. Artifacts persist across restarts, so you do not pull the full model on every run.
Local Cache
An essential variable to configure on your host system is the cache path directory. This directory is mapped from the host machine to container; assets (for example, model weights) are downloaded to this host directory and persist across container restarts. Configuring a local cache is highly recommended, as it avoids re-downloading large model files upon subsequent container restarts. You can name the environment variable containing the path to the local cache whatever you want.
Create the cache directory and export an environment variable:
When you start the NIM container, you must map your host machine’s local cache directory ($LOCAL_NIM_CACHE) to the container’s internal cache path (/opt/nim/.cache) using a Docker volume mount, such as -v "$LOCAL_NIM_CACHE:/opt/nim/.cache". This mapping ensures that the large model weights downloaded by the container are saved to your host machine. Because containers are ephemeral, any data stored only inside the container is lost when it stops. By using a volume mount, subsequent container runs detect the existing model files in your local cache and skip the lengthy download process, allowing the NIM to start up faster.
If you created an NGC API key, authenticate with the NVIDIA Container Registry using the following command:
Use $oauthtoken as the username and NGC_API_KEY as the password. The $oauthtoken username is a special name that indicates that you will authenticate with an API key and not a user name and password.
Choose the Model Source
Choose one of the following model sources.
To download the checkpoint from Hugging Face when the container starts, set
NIM_MODEL_PATH to the repository. Append the revision that the recipes were
validated with to pin the download to that revision:
Without the revision suffix, NIM follows the main branch of the repository.
NIM saves the downloaded files in the mounted cache, so the cache volume needs
approximately 400 GB of free space.
To use a checkpoint that you already downloaded, set MODEL_DIR to the host
directory that contains the Hugging Face files. The launch command in
Run NIM mounts it read-only:
For other sources, refer to Supported Model Sources.
Pull the Container and Download the Recipe
Pull the experimental SGLang Model-Free NIM container and download the matching
Inkling-2-Small recipe. Both artifacts
use version 2.1.9-variant-inkling-2-small:
The container runs as UID 1000. The NGC CLI can save the recipe directory and
files with modes 0700 and 0600, so that only the downloading user can read
them. The chmod commands make them readable by the container user and change
only the file mode.
Select a Recipe
Each GPU type has two recipes. The standard recipe uses plain decoding. The
recipe whose name ends in -dspark.yaml enables DSpark speculative decoding.
Select the recipe for your GPU type, and set GPU_COUNT to the GPU count in the
recipe name:
For example, to use four B200 GPUs with standard decoding, set:
For GB200, also set the IMEX channel:
For all other GPU types, leave GPU_DOCKER_ARGS empty (GPU_DOCKER_ARGS=()).
Run the launch command in the same Bash shell where you set these variables.
All recipes use the following settings:
Run NIM
Mount the selected recipe read-only and load it with NIM_CONFIG_FILE.
To download the checkpoint from Hugging Face, mount the cache:
To use a local checkpoint, mount the model directory read-only instead:
A recipe is required for this model. The recipe sets the parallel layout, and
the engine accepts only one layout per node for this model: expert parallelism
equal to tensor parallelism, with no data or pipeline parallelism. Starting the
container without NIM_CONFIG_FILE is not a supported configuration.
Note the following about the launch options:
- GPU count: Expose exactly the GPU count of the recipe. If more GPUs are
visible, NIM uses the first GPUs up to the recipe’s
tp_sizeand logs a warning that names the used and idle GPUs. If fewer GPUs are visible, the container does not start. - Shared memory: The container needs more shared memory than the Docker
default of 64 MB. With the default, startup fails after one to two minutes
with
NCCL error: unhandled system error. Keep--ipc=host,--shm-size=32g, and--ulimit memlock=-1, which every validated configuration uses. On GB200, all three options are required.
Override a Recipe Setting
While NIM_CONFIG_FILE is set, the recipe is authoritative. A key in the recipe
takes precedence over the matching NIM_* environment variable,
NIM_PASSTHROUGH_ARGS, and container command-line options. Settings that the
recipe does not name follow the usual precedence. For the general recipe
workflow, refer to Run with a Downloaded Serving Recipe.
To run with a different value for a recipe key, edit a copy of the recipe and
set RECIPE to the copy. Any change moves the deployment outside the validated
configuration.
Interact with the API
The container provides /v1/chat/completions, /v1/completions,
/v1/responses, and the Anthropic-compatible /v1/messages endpoint. Use the
running container’s /docs explorer for request and response schemas. For
additional request formats, refer to API Reference.
Verify Health Endpoints
Wait for the model to load before sending inference requests. The readiness endpoint returns HTTP 200 when the model is ready:
With the weights on local disk, startup takes approximately 10 to 15 minutes
for weight loading and CUDA graph capture. The first start with an hf://
model path also includes the download time. Set Kubernetes startup probes and
client timeouts accordingly.
Find the Model Name
The recipes set served_model_name to thinkingmachines/Inkling-2-Small.
Query /v1/models to confirm the identifier:
Use this identifier in the model field of every request. You do not need to
set NIM_SERVED_MODEL_NAME.
Send a Chat Completion Request
The model reasons by default. The response returns the reasoning text in
choices[0].message.reasoning_content and the final answer in
choices[0].message.content. Reasoning tokens count against max_tokens. If
the response ends with finish_reason: "length" and an empty content,
increase max_tokens and retry.
Streaming
To receive output incrementally, add "stream": true to the request. The API
returns Server-Sent Events. Streamed chunks carry reasoning in
choices[0].delta.reasoning_content and the answer in
choices[0].delta.content, and the stream ends with data: [DONE].
Control Reasoning
Set the top-level reasoning_effort field of a Chat Completions request to
control reasoning:
- To turn reasoning off, set
"reasoning_effort": "none". - To select an effort, set
reasoning_efforttominimal,low,medium,high,xhigh, ormax, or to a number from0.0to0.99.
If you omit reasoning_effort, the model reasons at its default effort. Other
values return HTTP 400. The chat_template_kwargs flags enable_thinking and
thinking have no effect on this model.
For example, to answer without reasoning:
Send an Image Request
Include text and image_url content parts in a user message. The image can be
an http or https URL that the container can reach, or a base64 data: URI:
Every recipe sets no_allow_local_media_files: true. An image given as a path
or a file:// URL inside the container returns HTTP 400. The recipes do not
restrict the hosts from which the container fetches http or https images.
If your deployment requires that restriction, apply it at the network level.
Audio and video content parts are not supported and return HTTP 400.
Tool Calling
Supply function definitions in tools. The model can return one or more tool
calls in choices[0].message.tool_calls. Your application runs each tool and
sends the result in a tool message in the next request. tool_choice accepts
auto, required, none, or a named function. For a complete execution loop,
refer to Tool Calling and MCP Integration.
Structured Output
Use response_format to constrain the answer to a JSON schema. The constraint
applies to the answer in content, not to the reasoning text:
Send a Responses Request
The recipes enable the response store, so you can retrieve a stored response
with GET /v1/responses/{response_id} and continue a conversation with
previous_response_id:
The model reasons by default. The response output contains a reasoning item
followed by the message item. To select an effort, add
"reasoning": {"effort": "low"}.
Send an Anthropic-Compatible Messages Request
On /v1/messages, the model does not reason unless the request asks for it.
To request reasoning, add a thinking block:
The response returns the reasoning in a thinking content block before the
text block.
Troubleshooting
- Startup fails with
NCCL error: unhandled system error: The container does not have enough shared memory. Add--ipc=host --shm-size=32g --ulimit memlock=-1todocker run. - The container does not start: Confirm that
NIM_CONFIG_FILEis set, that the recipe matches your GPU type, and that at least the recipe’s GPU count is visible to the container. Use the container and recipe from the same version. - The recipe cannot be read: Run
chmod 0755on the recipe directory andchmod 0644on the recipe files, as shown in Run NIM. - Requests fail with a model-name error: Query
/v1/modelsand use the reported identifier,thinkingmachines/Inkling-2-Small. - An answer is empty: Check
finish_reason. If it islength, the reasoning used the output budget. Increasemax_tokens, or setreasoning_effortto a lower effort or tonone. - An image request returns HTTP 400: Send an
httporhttpsURL that the container can reach, or a base64data:URI. Local paths andfile://URLs are not allowed. - A request with
stopreturns an empty or truncated answer: Stop strings also match control-token text and reasoning text. Refer to the stop-string known issue.
For additional diagnostics, refer to Troubleshooting.
Next Steps
- To build a complete tool execution loop, refer to Tool Calling and MCP Integration.
- For request and response formats, refer to API Reference.
- For known issues, refer to the Inkling-2-Small entries in the release notes, starting with stop strings.