Get Started with Inkling-2-Mini
Deploy Inkling-2-Mini 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-Mini.
Inkling-2-Mini is a looped sparse mixture-of-experts model with
26.4B total and 3.4B active parameters. Its checkpoint mixes NVFP4 and MXFP8
precisions, and the recipe names label it nvfp4. The model 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-mini 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. Use four B200, GB200, H200, H20 (96 GB), or H20-3e GPUs, or one DGX Spark. Data parallelism and pipeline parallelism are not supported for this model. The four GPUs in a multi-GPU deployment must be connected by NVLink.
- Disk space: The checkpoint is approximately 20 GB. Provide at least 25 GB of free space for it, in addition to approximately 31 GB for the container image.
- NGC CLI: Install the NGC CLI to download the serving recipe.
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 25 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-Mini recipe. Both artifacts
use version 2.1.9-variant-inkling-2-mini:
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 data center GPU type has two recipes. The standard recipe uses plain
decoding. The recipe whose name ends in -dspark.yaml enables DSpark
speculative decoding and serves a shorter context. DGX Spark has a DSpark recipe
only. Select the recipe for your GPU type, and set GPU_COUNT to the GPU count
in the recipe name:
For example, to use four H200 GPUs with standard decoding, set:
For DGX Spark, set GPU_COUNT=1.
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:
Load a recipe for every deployment. The recipe sets the parallel layout:
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: Keep
--ipc=host,--shm-size=32g, and--ulimit memlock=-1, which every validated configuration uses.
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 took approximately 7 to 15 minutes in
testing. In the startup logs, CUDA graph capture accounts for approximately 50%
to 90% of that time, and weight loading and other initialization account for the
rest. 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-Mini.
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 always reasons. 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.
Set max_tokens on every request. The model can occasionally keep reasoning
until it reaches the output limit. Refer to the
long-reasoning known issue.
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
Reasoning cannot be turned off for this model. Set the top-level
reasoning_effort field of a Chat Completions request to adjust how much the
model reasons:
- Set
reasoning_efforttonone,minimal,low,medium,high,xhigh, ormax, or to a number from0.0to0.99. - For the least reasoning, use
minimalor a small number such as0.01.noneis accepted, but the model still reasons and can use more reasoning tokens thanminimal.
If you omit reasoning_effort, the model reasons at its default effort of
0.9, which equals high. Other values return HTTP 400. The
chat_template_kwargs flags enable_thinking and thinking have no effect on
this model.
For example, to answer with minimal 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, so 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. Stored responses remain in server-process memory,
have no expiry or size limit, and are lost when the server restarts. Set
"store": false on requests that do not need to be retained:
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
The response returns the reasoning in a thinking content block before the
text block, whether or not the request includes a thinking block.
Troubleshooting
- 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 Pull the Container and Download the Recipe. - Requests fail with a model-name error: Query
/v1/modelsand use the reported identifier,thinkingmachines/Inkling-2-Mini. - An answer is empty: Check
finish_reason. If it islength, the reasoning used the output budget. Increasemax_tokens, setreasoning_effortto a lower effort, or retry the request. - A long prompt is rejected: The prompt tokens plus
max_tokensmust fit in the context window, which also holds the reasoning and the final answer. The DSpark recipes serve a 131,072-token window. For a 1,048,576-token window, use a standard recipe on a data center GPU. - 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 answer: Stop strings also match control-token text and reasoning text. Refer to the stop-string known issue.
For additional diagnostics, refer to Troubleshooting.