<img alt="" src="https://secure.insightful-enterprise-intelligence.com/783141.png" style="display:none;">

publish-dateApril 24, 2024

5 min read

Updated-dateUpdated on 30 Sep 2025

Optimise GPU Utilisation for LLM Inference: Batching with Llama2 vs Mixtral

How to Use Batching for Efficient GPU Utilisation

Written by

Damanpreet Kaur Vohra

Damanpreet Kaur Vohra

Technical Copywriter, NexGen cloud

Share this post

Table of contents

In our series comparing two of the most popular language models, Mixtral-8x7B and LLaMA2-70B, we previously explored using Oobabooga's web-based text generation UI to run these LLMs in the cloud. We covered important aspects such as choosing the right GPU instance, setting up the required environment, deploying a cloud VM, starting the web UI and running a pre-trained model.

With the fundamentals out of the way, we now move forward on learning about the use of batching for GPU utilisation. In this next part of the series, we'll explore strategies for maximising throughput and getting the absolute most out of your GPU infrastructure when running cutting-edge LLM batch inference.

Use Case: Summarising Educational Nature Video Transcripts

For this tutorial, we'll use a real-world and interesting use case i.e. generating summaries for educational video transcripts about nature from the popular YouTube playlist on TED-Ed. The playlist covers fascinating topics like why animals form swarms, the three different ways mammals give birth, and other curiosities about the natural world. While highly informative, the full video transcripts can be quite long. The goal is to leverage the capabilities of large language models like Mixtral-8x7B and LLaMA2-70B to automatically generate concise 100-word summaries that extract the key facts and takeaways from each video transcript.

This use case provides a great benchmark for evaluating the text generation capabilities of large language models, as well as optimising their inference performance on GPUs through techniques like GPU batching. By the end of this tutorial, we'll be able to rapidly generate summaries for all 100 video transcripts in our dataset in a highly optimised and parallelised way, showcasing the power of models like Mixtral-8x7B and LLaMA2-70B.

Setting Up Jupyter Notebooks with GPU Acceleration

First, you'll need a Python environment configured with GPU acceleration, such as a cloud VM instance with one or more NVIDIA GPUs. For example, we use a beefy setup with 4 NVIDIA A100 80GB GPUs connected via PCIe for excellent latency and throughput, though you can use fewer GPUs as available. We'll work in Visual Studio Code with the GPU-powered VM instance remotely connected.

Getting Video Transcripts from YouTube

Our use case is to generate summaries for educational nature video transcripts from the popular TED-Ed YouTube channel. We scrape the video list and transcript data from the channel's website.

Using the “youtube-transcript-api” Python library, we can fetch the raw transcript text for any given YouTube video ID. This returns the transcript as a list of dictionaries, which we can flatten into the full transcript text string. We'll export these 100 transcripts using Pandas into a CSV file for easy processing in the next step.

Performing LLM Inference to Obtain Summaries

We'll utilise two powerful open-source language models to generate summaries from the video transcripts: the 70 billion parametres LLaMA model from Meta and Mixtral-8x7 from Mistral.AI. We load these large models using the HuggingFace Transformers library. The key is to share the model across multiple GPUs using the” device_map” parameter. We also enable the “FlashAttention2” kernel for efficient GPU utilisation.

With the model loaded, we can now generate summaries for each video transcript by building a prompt combining a template and the transcript text:

“The following is a transcript from an educational video on nature. Summarise the transcript, extracting the main takeaways. Focus on curious facts. Use a friendly tone and write in simple English.”

This prompts the model to generate a summary extracting the key takeaways and interesting facts from the given video transcript, in a friendly tone aimed at educational content.

Batching Requests for Better GPU Utilisation

While this approach works for generating individual summaries, if we monitor LLM GPU utilisation during the inference, we see it is surprisingly low. To better optimise our hardware, we can take advantage of batch size and GPU memory - grouping multiple inference requests into one larger forward pass through the model. This allows us to feed more work to the GPU at once for better parallelisation.

We modify the code to make a batch of prompts as input, packing their tokens into a single inference request. So by increasing the batch size from 1 (no batching) to 2, 4, 8, 16, 32 and higher, we are feeding more parallel work to the GPU which can dramatically improve utilisation. However, larger batches also increase memory requirements, so there is a tradeoff in finding the optimal batch size for the available GPU memory.

Evaluating the Batching Performance

To systematically analyse the performance impact of batching, we run a series of experiments generating video summaries with different batch sizes from 1 to 64.

For each experiment, we record the overall tokens/second throughput achieved and plot the results for both the Mixtral-8x7B and Llama 2-70B models:

Screenshot 2025-06-20 133931

As expected, we see that larger batch sizes yield significantly higher throughput, as we are better able to utilise the GPU's parallel computing capabilities.

Interestingly, for smaller batch sizes under 16, the smaller Mixtral model is faster than LLaMA. But as we increase the batch size to 32 and 64, the advantage flips and the larger LLaMa model starts to outperform, achieving over 1500 tokens/sec at the maximum 64 batch size.

We can visualise this crossover more clearly by plotting the speedup factor over ideal inference batching:

Screenshot 2025-06-20 134707

The green llama line stays closer to the ideal linear 32x speedup at batch size 32, compared to Mixtral which sees more diminishing returns from batching on the larger model.

This indicates that while all models benefit from batching to experience GPU parallelism, different models may scale differently. 

Limitations of Batching

While extremely effective, batching does have its limits. If we try to batch too many requests together, we run into out-of-memory issues even on the NVIDIA A100 80GB GPUs used in this tutorial. For the 100 video transcripts, both models ran out of memory when trying to batch all of them together into one forward pass, despite the high GPU memory capacity.

So there is a tradeoff between batch size and memory usage that needs to be balanced. We can't pack infinite requests together, but we can always work towards finding an optimal batch size while staying within the available memory

Conclusion

In this tutorial, we learned about improving the inference performance of large language models like Mixtral-8x7B and LLaMA2-70B when running on GPU hardware. The key technique was batching - grouping multiple inference requests into one larger forward pass through the model.

Even simple batching strategies enabled massive speedups in throughput and much better utilisation of the GPU's parallel computing capabilities. While pushing too large of batch sizes can cause out-of-memory issues, a reasonable batch size like 32 yielded around 6x speedup over naive single-request inference.

However, focusing solely on throughput metrics is not enough. In the next part, we'll evaluate the quality of the summarisation outputs in this Mixtral-8x7B and LLaMA2-70B series! 

Watch the full tutorial below


 

Subscribe to Hyperstack!

Enter your email to get updates to your inbox every week

Related content

Stay updated with our latest articles.

tutorials Tutorials link

Claude Fable 5.2 Tested: Effort, Cost and How Mythos 5.2 Differs

Anthropic has released Claude Fable 5.2 and Claude Mythos ...

Anthropic has released Claude Fable 5.2 and Claude Mythos 5.2, one underlying model offered two ways. Fable 5.2 is available to every customer, with cyber and biology safeguards, and Mythos 5.2 is for organisations Anthropic approves for security or life-sciences work.

Launch benchmarks show which model scores highest, but do not make it clear which Claude model is worth paying for on your workload.

We gave Fable 5.2 small tasks with built-in traps (a GPU job schedule, a SQL query over a messy database and a dense line chart), ran the schedule five times at each effort level and measured accuracy, cost and speed. We tested Fable 5.2 on the Claude API against Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5.

Tests ran in November 2026. We have included Anthropic’s own scores, how to choose an effort level and where cheaper Claude models are enough. We also cover speed, fast mode and the code changes that break older integrations.

One Model, Two Ways In

Who can use which model

 
 ONE UNDERLYING MODELsame capabilities, specs and priceClaude Fable 5.2claude-fable-5-2Every customerCyber and biology safeguardsCyber fallback: Claude Opus 4.8Biology fallback: Claude Opus 5Claude Mythos 5.2claude-mythos-5-2Approved organisationsCyber Verification ProgramLife Sciences Verification ProgramInside Claude Security for Enterprise$8 / $40per million tokens$16 / $80fast mode1Mtoken context128Koutput tokens

Prices fall from $10 and $50 on Fable 5.1, and Anthropic reports output up to 30% faster; its developer notes list the API changes.

Claude Fable 5.2 Benchmarks

In Anthropic’s scores, the largest gains over Fable 5.1 come in robotics, chart reading and knowledge work. The biggest jump is in simulated robotics, where RoboDojo Sim rises from 27.6% to 64.9%. Chart reading (Chartography) goes from 44.8% to 73.4%, and the Remote Labor Index from 17.9% to 41.3%. In the chart’s Coding and agents view, the biggest rise is Terminal-Bench-Science, from 52.6% to 74.6%. Fable 5.2 is also ahead of Opus 5.5 on all ten benchmarks shown:

Fable 5.2 vs Fable 5.1 vs Opus 5.5

Scores reported by Anthropic.

 
Anthropic reports Claude Fable 5.2 ahead of Claude Fable 5.1 and Claude Opus 5.5 on all ten benchmarks shown, including FrontierSWE v2 at 69.9, the Remote Labor Index at 41.3 and RoboDojo Sim at 64.9.

What Fable 5.2 and Mythos 5.2 Built

Anthropic’s launch videos show the range:

Fable 5.2 coordinated over 1,000 subagents for eight days to build an operating system that boots on a laptop.

An operating system built by Claude Fable 5.2, running on a laptopOperating system
Voice-assistant hub circuit board designed by Claude Fable 5.2Electronics
Robot arms controlled by Claude Fable 5.2 with a puzzle cubeRobotics
Gene-therapy capsid structure predicted by Claude Mythos 5.2Mythos capsid

Videos: Anthropic.

Choosing an Effort Level

Thinking is always on, so effort (an API setting from low to max that controls how much the model reasons) sets depth, time and cost. To test it, we set a trap: 12 jobs to schedule on three GPU nodes, where job C needs all three nodes at once. Starting whatever is ready whenever nodes are free keeps job C waiting until hour 12, and the plan runs to hour 30. The best plan finishes at hour 21 by deliberately leaving nodes idle so job C can start at hour 2.

Two schedules for the same 12 jobs

 
Start whatever is readydone at hour 30N1N2N3ABFIHCDEKGJLPlan by Claude Fable 5.2done at hour 21N1N2N3BCADFEGHIJKL036912151821242730hoursjob C needs all three nodesidle on purpose
solver.pyPYTHON
with client.messages.stream(
    model=model,
    max_tokens=max_tokens,
    thinking={"type": "adaptive", "display": "summarized"},
    output_config={"effort": effort, "format": {"type": "json_schema", "schema": puzzle.SCHEMA}},
    messages=[{"role": "user", "content": puzzle.prompt_text()}],
) as stream:
Output: run 1OUTPUT
low     correct=True   finish=21h  output= 1,445 tokens    22.4s  $0.065
medium  correct=False  finish=22h  output= 1,470 tokens    21.9s  $0.066
high    correct=True   finish=21h  output= 1,724 tokens    23.8s  $0.076
xhigh   correct=True   finish=21h  output= 2,400 tokens    32.6s  $0.103
max     correct=True   finish=21h  output= 3,770 tokens    48.2s  $0.158

Over five runs per effort level, xHigh and max found the 21-hour schedule every time, and every miss was 22 hours. Low and high found it in four runs out of five, but medium found it only once, so more effort did not always mean a better answer. With five runs per level, treat that dip as a warning rather than a rule.

Five runs per effort level

Runs that found the 21-hour schedule, out of five per level; the other views show the average cost and output tokens per run.

 
Claude Fable 5.2 found the 21-hour optimum in 4 of 5 runs at low, 1 of 5 at medium, 4 of 5 at high and 5 of 5 at xhigh and max, at an average of $0.068 to $0.176 a run.

Cost rises with every level, from $0.068 a run at Low to $0.176 at max, 81% more than xHigh for the same result. XHigh is the cheapest level that never missed; low suits jobs where you can check the answer and retry.

Claude Fable 5.2 vs Cheaper Claude Models

On short, well-defined work, cheaper models kept pace: Opus 5.5, Sonnet 5.5 and Haiku 5.5 solved the trap in all three runs at high effort, and all five models found the exact revenue in a trap-laden SQL database. Haiku 5.5 did both at about 1/26 to 1/80 of Fable 5.2’s cost.

Same tasks, five Claude models

One SQL agent run per model; the other views show its time and the average cost of a scheduling run.

 
In the SQL agent test all five models returned the exact figure, at $0.224 for Claude Fable 5.2 against $0.003 for Claude Haiku 5.5.

We also asked Fable 5.2, Fable 5.1 and Opus 5.5 to read every value from a dense line chart with 48 closely spaced points, in one run each. Fable 5.2 read all 48 exactly, against 47 for Opus 5.5 and 5 for Fable 5.1, though none of Fable 5.1’s readings was more than 3 GPU hours out.

Claude Fable 5.2 Speed and Fast Mode

On one prompt at low effort, Fable 5.2 averaged 78 output tokens per second against 57 for Fable 5.1, 36% faster, above Anthropic’s figure of up to 30%. Opus 5.5 generated tokens faster still, at 86 per second, and cost about half as much per answer: $0.026 against $0.052. Fast mode takes one parameter and reaches 220 tokens per second, finishing in about a third of the time (5.4 seconds against 16.5 in standard mode) for 1.8 times the cost per answer:

speed.pyPYTHON
extra = {"speed": "fast"} if speed == "fast" else {}  # fast mode needs no beta header on Claude Fable 5.2
# ...
with client.messages.stream(
    model=model,
    max_tokens=4000,
    output_config={"effort": "low"},
    messages=[{"role": "user", "content": PROMPT}],
    **extra,
) as stream:
Output: run 1OUTPUT
claude-fable-5-2  standard  1119 tokens  first text  1.72s  total  14.74s    75.9 tokens/s  $0.0452
claude-fable-5-2  fast      1191 tokens  first text  0.84s  total   5.39s   220.9 tokens/s  $0.0962
claude-fable-5-1  standard  1127 tokens  first text  0.62s  total  19.41s    58.1 tokens/s  $0.0569
claude-opus-5-5   standard  1301 tokens  first text  1.56s  total  15.11s    86.1 tokens/s  $0.0262

Three runs per setup

 
 
Output tokens per second: 57 for Claude Fable 5.1, 78 for Claude Fable 5.2, 86 for Claude Opus 5.5 and 220 for Claude Fable 5.2 in fast mode.

Claude Fable 5.2 API: Getting Started

The Models API shows which models a key can call:

models_check.pyPYTHON
import anthropic

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY

available = {m.id: m for m in client.models.list()}
for model_id in ["claude-fable-5-2", "claude-mythos-5-2", "claude-fable-5-1", "claude-opus-5-5"]:
    print(f"{model_id:20} {'available' if model_id in available else 'not available to this key'}")

fable = client.models.retrieve("claude-fable-5-2")
caps = fable.capabilities
print("\n" + fable.display_name)
print("context window   :", f"{fable.max_input_tokens:,} tokens")
print("max output       :", f"{fable.max_tokens:,} tokens")
# ...
print("thinking types   :", [t for t, v in caps.thinking.types.to_dict().items() if v["supported"]])
print("effort levels    :", [e for e in ("low", "medium", "high", "xhigh", "max") if getattr(caps.effort, e).supported])
OutputOUTPUT
claude-fable-5-2     available
claude-mythos-5-2    not available to this key
claude-fable-5-1     available
claude-opus-5-5      available

Claude Fable 5.2
context window   : 1,000,000 tokens
max output       : 128,000 tokens
thinking types   : ['adaptive']
effort levels    : ['low', 'medium', 'high', 'xhigh', 'max']

Mythos 5.2 accepts the same requests with the model ID claude-mythos-5-2; access runs through the Cyber Verification Program and the Life Sciences Verification Program.

What Changes in Your Code

Code written for earlier Claude models can break on four rules from Anthropic’s migration and prompting guides:

tool_choice: any or tool
Returns a 400 error. Keep auto with a strict tool, or use JSON outputs.
<thinking> tags
Can be declined as reasoning_extraction, which has no fallback; set display to "summarized" instead.
Edited history
Fails the prefix check on every account: keep system and tools fixed, and only append.
stop_reason: refusal
Turn on server-side fallback to rerun cyber and biology refusals on Claude Opus 4.8 or Opus 5.
safeguards.pyPYTHON
response = client.beta.messages.create(
    model="claude-fable-5-2",
    max_tokens=8000,
    output_config={"effort": effort},
    # ...
    fallbacks="default",  # retry a declined request on the model Anthropic recommends for its category
    betas=["server-side-fallback-2026-07-01"],
    messages=[{"role": "user", "content": prompt}],
)
# ...
if response.stop_reason == "refusal":  # check this before reading content
    print(f"declined: category={response.stop_details.category} | {response.stop_details.explanation}")

Running the Capsid Folding Models on Hyperstack

Anthropic’s gene-therapy capsid example (the Mythos capsid clip) shows how the work splits. Mythos 5.2 wrote the method, and for the AAV2 capsid a single NVIDIA H200 GPU ran the open protein-folding models OpenFold3-preview2 and ESMFold2:

How Mythos 5.2 modelled the capsid

 
 1Claude Mythos 5.2 writes the methodCode that runs open-source folding models on the capsid2Groups of five neighbouring chainsThe folding runs on overlapping groups of chains3One NVIDIA H200 GPU runs the foldingAAV2: about 58 min with OpenFold3-preview2, 7 with ESMFold24Symmetry stitches all 60 chainsAAV2: 1.2 Å RMSD with OpenFold3-preview2, 1.4 Å with ESMFold2icosahedral symmetry

Direct access to Mythos 5.2 is limited to approved organisations, but those folding models are open, so anyone can run them. NVIDIA H200 SXM is available on demand on Hyperstack in eight-GPU virtual machines, billed per minute. AI Studio also serves open models.

Claude Mythos 5.2 predicts the structure of a gene-therapy capsid

Film: Anthropic.

Hyperstack GPU Cloud

Run the GPU Side on Hyperstack

Run folding pipelines and open models on NVIDIA H200 and NVIDIA H100 GPUs.

NVIDIA H200 SXMAI StudioPer-minute billing

Get started with Hyperstack in minutes.

FAQs

How do Claude Fable 5.2 and Claude Mythos 5.2 differ?

One model, one price: Fable 5.2 is open to everyone, with safeguards, and direct access to Mythos 5.2 goes to approved organisations.

How much does Claude Fable 5.2 cost?

$8 per million input tokens and $40 per million output tokens; batch requests cost half, and fast mode $16 and $80.

How do I access Claude Mythos 5.2?

Apply to Anthropic’s Cyber or Life Sciences Verification Program; approved organisations use the model ID claude-mythos-5-2. Claude Enterprise customers can also use it inside Claude Security.

Is Claude Fable 5.2 better than Claude Opus 5.5?

Anthropic’s scores put it ahead on all ten charted benchmarks; in our tests, Opus 5.5 matched it on scheduling and SQL for less and generated output faster.

Fareed Khan

Fareed Khan

calendar 12 Nov 2026

•

Read More
tutorials Tutorials link

Can Qwen 4 Compete With Claude Opus 5.5? We Put It to the Test

New models launch with their makers’ own benchmark scores, ...

New models launch with their makers’ own benchmark scores, but public benchmark questions can leak into training data, so those scores may not show how a model handles work it has not seen. That is why we test new models on the same sealed tasks, built on Kestrelmoor Freight, a synthetic company.

Our latest blog puts Alibaba’s Qwen 4 through those tests, covering the results first, then what they mean for your workloads, then the code to reproduce the test yourself.

How the Qwen 4 Benchmark Works

We built Kestrelmoor Freight for this test: a fictional logistics company whose invoices, dashboards, app screens, screen recordings and case files are all generated by code. The generator knows every answer, so each task is graded exactly, and none of it can appear in a model’s training data.

One synthetic company, nine jobs, three stages

 
 KestrelmoorFreightsynthetic firmPaperwork8 scriptsDashboardsIncident chartsDense screens1440 by 900 UIRecordingsUp to 10 minStacked rulesUp to 20 rulesPolicy casesCargo claimsCase filesUp to 256K tokens8 languagesOne answerLogic puzzlesOne solutionNINE JOBSTHREE STAGESSTAGE 1 · MAP6 modelsevery model on every jobSTAGE 2 · DUEL400 sealed4 jobs × 100 new tasksSTAGE 3 · SCALE1,250 docseach read twiceSame bytes for every model · 32,000-token output limit · every answer graded by code

The map put Qwen 4, Claude Opus 5.5, Kimi K3.1 Pro and three earlier Qwens through all nine jobs. The duel then reran the four jobs where Qwen 4 looked strongest (dense screens, paperwork, hard paperwork and writing to 16 to 20 rules) on 400 new tasks, each sealed with a cryptographic hash before any model saw it. A scale run then had Qwen 4 read 1,250 invoices and receipts.

Qwen 4 vs Claude Opus 5.5 on Sealed Tests

On all four sealed jobs, Opus led Qwen 4 by 0.2 to 0.8 points, and only the paperwork gap holds up statistically. The largest generational step is writing to 16 to 20 rules: 99.6 against 87.3 for Qwen3.8 Max, which ran out of tokens on 18 of 100 tasks.

Claude Fable 5.1, which joined only the duel, led Qwen 4 on all four jobs, by 0.3 to 1.1 points. The open-weight Kimi K3.1 Pro scored 0.2 to 0.8 points above Qwen 4 on three jobs, within 0.1 points of Opus on each, and Qwen 4 led it only on hard paperwork, by 0.5 points. The earlier Qwens trail Qwen 4: Qwen3.8 Max by 0.5 to 12.3 points, and Qwen3.8 Flash-Next and Omni-Flash by up to 31.2 and 34.9 points, on 16 to 20 rules.

Qwen 4 minus each rival, in points

Paired by task; left of zero, the rival led.

 
Qwen 4 finished within one point of Claude Opus 5.5 on dense screens, hard paperwork, paperwork and 16 to 20 rules, and 12.3 points above Qwen3.8 Max on the rules test.

Where Qwen 4 Stands Out

Five tasks from the test show the range:

Invoice
20 rules
Pixel click
8 languages
Video

A photographed Russian invoice with handwritten corrections: every header field, quantity, price and amount matched, and across 1,250 documents it read 99.8% of fields correctly.

 SKUQTYUNIT PRICEAMOUNTBIN-79946999.385,996.281514,990.70FRK-8077204,878.4297,568.4060292,705.20STR-412024993.8123,851.444039,752.4012printed, crossed out15written by hand, as Qwen 4 read it13 of 13header fields right33 linesevery number right0values invented

A customs notice under 20 rules at once: Qwen 4 passed all 20, while every earlier Qwen ran out of tokens.

 1Ends with ?2Para 5: 3 sentences3ASCII only4≤16 words/sentence5≤50 chars/line6One bold phrase7≤3 all-caps words8Two keywords9No exclamations10≤12 letters/word11Six paragraphs12<<Title>> line13P.S. at the end14Quote a table cell15Six digit groups16Products in order174 numbered lines18"update" ×419Two bullet lines20175 to 215 words

Click an 18 by 17 pixel icon on a dense console: Qwen 4 hit it, while earlier Qwens missed by 41 to 161 pixels.

 Qwen 4: inside the iconQwen3.8 Max: 41 pxQwen3.8 Flash-Next: 46 pxQwen3.8 Omni-Flash: 161 pxDashed box: the 18 by 17 px edit icon in the row of shipment KX-25422.

The same stock problem in eight languages: Qwen 4 answered 2224 each time, and all 64 tasks of the job correctly.

 EnglishEnglish2224中文Chinese2224日本語Japanese2224한국어Korean2224العربيةArabic2224اردوUrdu2224हिन्दीHindi2224РусскийRussian2224

One 10-minute recording with three one-second errors, sent as an MP4: Qwen 4 answered all four questions. Given 96 still frames instead, it answered half.

 15:39:2915:49:29q1 first error at 15:42:20q2 Settings tab, the click beforeq3 three errorsq4 KX-53913 saved as ON_HOLDroutine noticered error, one second on screen4 of 4 rightONE 600-SECOND MP4, 388,312 INPUT TOKENS

Where Claude Opus 5.5 Keeps an Edge

Opus leads on two jobs: dashboard threshold times, 100% against 71% in the first round, and long archives, 99.0 against 84.4. Qwen 4’s dashboard misses are chart-reading errors: given the same data as text, it answered every question. Its archive misses all came at 128K tokens or more.

Where Opus leads

 
Dashboard threshold times, first roundQwen 471%Claude Opus 5.5100%Long archives: eight shared case files, 32K to 256K tokensQwen 484.4Claude Opus 5.599.0

Opus also wrote about a third of Qwen 4’s output tokens, at a lower reasoning-effort setting: high against xhigh.

Qwen 4 Speed and Token Efficiency

On the same 912 tasks, Qwen 4 wrote 20% fewer output tokens than Qwen3.8 Max and answered in 40% less time. It also used fewer input tokens than Claude on a screenshot, 1,262 against 1,728, and fewer on a 12-second clip sent as video than as frames, 7,823 against 15,453:

Where Qwen 4 saves tokens and time

 
 
Qwen 4 used 6,090 output tokens and 99 seconds per answer against 7,624 and 164 for Qwen3.8 Max, 1,262 tokens for a screenshot against 1,728 for Claude, and 7,823 tokens for a 12-second clip as video against 15,453 as frames.

Sending Images and Video to Qwen 4

One converter builds every Qwen 4 request as an OpenAI-compatible chat completion, with images and video inline as base64 data URLs:

families/base.pyPYTHON
MEDIA_TYPES = {".png": "image/png", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".mp4": "video/mp4"}
# ...

def _b64(rel: str) -> tuple[str, str]:
    path = EVAL / rel
    return MEDIA_TYPES[path.suffix.lower()], base64.b64encode(path.read_bytes()).decode()


def to_openai(prompt: dict) -> list:
    parts = []
    for rel in prompt.get("images") or []:
        mt, data = _b64(rel)
        parts.append({"type": "image_url", "image_url": {"url": f"data:{mt};base64,{data}"}})
    if prompt.get("video"):
        mt, data = _b64(prompt["video"])
        parts.append({"type": "video_url", "video_url": {"url": f"data:{mt};base64,{data}"}})
    parts.append({"type": "text", "text": prompt["text"]})
    msgs = [{"role": "system", "content": prompt["system"]}] if prompt.get("system") else []
    msgs.append({"role": "user", "content": parts if len(parts) > 1 else prompt["text"]})
    return msgs

The body streams the reply, reports usage and caps output, reasoning included; the map and duel ran Qwen 4 at effort xhigh:

clients/qwen.pyPYTHON
body = {"model": self.model, "messages": messages, "stream": True,
        "stream_options": {"include_usage": True}}
if effort is not None:
    body["reasoning_effort"] = effort
if max_completion_tokens is not None:
    body["max_completion_tokens"] = max_completion_tokens

The photographed Russian invoice from the showcase cost 2,147 image tokens, and Qwen 4 reasoned for 7,613 tokens before a 2,090-token answer:

Output: usage recordJSON
{
  "prompt_tokens": 2401,
  "total_tokens": 12104,
  "completion_tokens": 9703,
  "prompt_tokens_details": {
    "image_tokens": 2147,
    "text_tokens": 254
  },
  "completion_tokens_details": {
    "reasoning_tokens": 7613,
    "text_tokens": 2090
  }
}

Run Qwen Models on Hyperstack

Qwen 4 is not available on Hyperstack, as we tested it through early API access. To get our next model test as soon as it is published, subscribe below. You can start building with the Qwen family now, as two models from this test run on Hyperstack:

Its model card calls it an experimental preview of the Qwen4 architecture; it runs on Hyperstack AI Studio with image input. In our sealed jobs, it scored 15.5 points below Qwen 4 on dense screens and 31.2 below on 16 to 20 rules.

It runs on AI Studio for text; our guide deploys it on 64 NVIDIA H100 GPUs.

Both use an OpenAI-compatible API, as our GLM-5.2 tutorial shows; Dedicated Inference serves a model on its own GPUs.

Hyperstack AI Studio

Build With Qwen Models on Hyperstack

Call Qwen3.8 Max and Qwen3.8 Flash-Next through AI Studio, or run open models on NVIDIA H100 GPUs.

OpenAI-compatible APINVIDIA H100Per-minute billing

Get started with Hyperstack in minutes.

FAQs

What is Qwen 4?

Qwen 4 is the next major release of Alibaba’s Qwen models, tested here through early API access.

How does Qwen 4 compare with Claude Opus 5.5?

Opus finished slightly ahead, within one point, on all four sealed jobs, and led more clearly on dashboard times and the longest archives.

Is Qwen 4 more efficient than Qwen3.8 Max?

On the same 912 tasks, both at effort xhigh, it wrote 20% fewer output tokens and answered in 40% less time.

Can I run Qwen models on Hyperstack?

Yes. Qwen3.8 Flash-Next and Qwen3.8 Max run on Hyperstack AI Studio.

Fareed Khan

Fareed Khan

calendar 11 Nov 2026

•

Read More
tutorials Tutorials link

Deploy DeepSeek-V4.1-Flash on GPU Cloud for 1M-Context Inference

DeepSeek-V4.1-Flash-1017 is an updated release of ...

DeepSeek-V4.1-Flash-1017 is an updated release of DeepSeek-V4.1-Flash, a multimodal mixture-of-experts model with 552 billion backbone parameters that reads text and images, writes text and holds up to 1,048,576 tokens of context. Only 8 billion parameters are active for each prompt token and 16 billion for each generated token. The whole checkpoint is 510 GB, and once its Engram memory moves to host RAM, a DeepSeek-V4.1-Flash deployment fits on one node of eight 80 GB GPUs.

This guide deploys it on a single Hyperstack virtual machine with 8x NVIDIA H100-80G-PCIe-NVLink GPUs, using vLLM 0.31.0 and the NVIDIA H100 configuration from the vLLM recipe for DeepSeek-V4.1-Flash: tensor parallel 8, the Engram tables in pinned host memory, a 4,096-token batch budget and the full one-million-token context. The result is a private, OpenAI-compatible endpoint with thinking, a reasoning effort setting from 1 to 100, tool calling and image input, ready for an agent harness such as Claude Code.

Most of what lets the model fit on one machine comes from its design rather than from tuning. DeepSeek puts its global KV cache at 890 bytes per token, about a quarter of DeepSeek-V4-Flash's, and 196 billion of its parameters are Engram lookup tables that are read rather than computed, so they can sit in host memory. If you have followed our DeepSeek-V4-Pro multi-node Kubernetes guide, this is the opposite shape: one virtual machine, no cluster and no orchestration layer.

Inside DeepSeek-V4.1-Flash: 552B Parameters, 8B Active in Prefill

DeepSeek titles the release Pushing the Limits of KV Cache Compression, and almost every component serves that aim.

DeepSeek-V4.1-Flash-1017 at a glance

Six numbers that shape the deployment.

BACKBONE
552B parameters
Mixture of experts: 1 shared and 384 routed experts, 6 routed active per token
ACTIVE PER TOKEN
8B prefill, 16B decode
A causal encoder-decoder lets most prompt tokens skip the decoder
CONTEXT
1,048,576 tokens
YaRN scaling, factor 16, from a 65,536-token original window
GLOBAL KV CACHE
890 bytes per token
About a quarter of DeepSeek-V4-Flash's, stored in FP4
ENGRAM MEMORY
196B parameters
Two n-gram lookup tables, at layers 1 and 14
CHECKPOINT
510.3 GB, 48 shards
MXFP4 experts, FP8 dense weights, MIT licence

Sources: the DeepSeek-V4.1-Flash-1017 and DeepSeek-V4.1-Flash model cards, the technical report, config.json and the 1017 repository file list.

The 1017 Weights: Same Architecture, Stronger Scores

DeepSeek describes DeepSeek-V4.1-Flash-1017 as a minor update to the launch release. The vLLM recipe records that its config.json, tokenizer files and prompt encoding match the launch repository byte for byte, and that the index holds the same 96,085 tensors, so only the weights change and one command serves either checkpoint.

The gains are broad. Terminal-Bench 4.0 rises from 31.2 to 42.3 and HLE without tools from 36.8 to 42.6, and DeepSeek reports shorter outputs and task execution times.

From the launch weights to 1017

Every benchmark on the 1017 model card moves up. Rows are sorted by the size of the gain; the hollow dot is the launch checkpoint, the filled dot the 1017 weights.

Launch weights1017 weights
Chart: scores for the launch weights and the 1017 weights on eleven benchmarks. Terminal-Bench 4.0 rises from 31.2 to 42.3, ProgramBench from 20.3 to 29.1, Apex Bench from 64.6 to 72.1 and HLE without tools from 36.8 to 42.6; every row improves.

Source: the DeepSeek-V4.1-Flash-1017 model card. Terminal-Bench 4.0 uses the Claude Code harness and DeepSWE v1.1 the Mini-SWE-V2 harness, as the card states.

A Causal Encoder-Decoder That Nearly Halves Prefill

The 40 transformer layers are split into a 20-layer causal encoder and a 20-layer decoder. In a decoder-only model, every layer derives its keys and values from its own hidden states, so every prompt token must run through all 40 layers. Here the decoder global KV cache is projected from the final encoder hidden state instead, which lets most prompt tokens stop at the end of the encoder.

According to the technical report, this nearly halves prefill computation, and it is where the 8 billion and 16 billion figures come from: a prompt token runs the encoder, a generated token runs both halves. DeepSeek designed the split for agentic work, which the report describes as increasingly input-heavy, with frequent tool calls generating long prefills.

How far a token travels

Most prompt tokens stop at the encoder. Generated tokens run all 40 layers.

Causal encoder, layers 0 to 19Decoder, layers 20 to 39Prompt token8B active per tokendecoder global KV, projectedfrom the final encoder statelast 128 prompt tokensGenerated token16B active per token

Drawn from section 2.2 of the technical report. The decoder still keeps a 128-token sliding window, so the last 128 prompt tokens also pass through it, a step DeepSeek calls Decoder SWA Bounded Replay.

Compressed Sparse Attention 2: Forty Layers, Four Global Caches

From layer 2 onwards, every layer combines a 128-token sliding window with a sparse view of the global context further back; layers 0 and 1 use the sliding window alone. Compressed Sparse Attention 2, or CSA2, decides where that global context comes from by giving each of those 38 layers one of three static modes:

  • Full layers compute their own global KV, score it with a lightweight indexer and keep the top 512 entries for each query.
  • Reindex layers reuse the global KV of the latest Full layer, but score it with their own indexer query and pick a fresh top 512.
  • Reuse layers take both the KV and the top 512 selection from an earlier layer and run attention directly.

Only four of the 40 layers compute a global cache at all: layers 2, 8, 14 and 20. The encoder stores one global entry for every two tokens, while the decoder keeps one per token. In the decoder, layer 20 also builds a candidate pool of 2,048 blocks of eight positions, and the four Reindex layers search only those 16,384 candidates, so their cost per query stays constant however long the context grows.

Forty layers, four global caches

Each square is one layer, coloured by how it obtains its global context.

CAUSAL ENCODERtwo tokens per global KV entryDECODERone token per global KV entry0SWA1SWAE2Full3Reuse4Reuse5Reuse6Reuse7Reuse8Full9Reuse10Reuse11Reuse12Reuse13Reuse14FullE15Reuse16Reuse17Reuse18Reuse19Reuse20Fullpool21Reuse22Reuse23Reuse24Reindex25Reuse26Reuse27Reuse28Reindex29Reuse30Reuse31Reuse32Reindex33Reuse34Reuse35Reuse36Reindex37Reuse38Reuse39Reuselayer 19 output projects the decoder global KV at layer 20DSpark drafter reads layers 37 to 39Sliding window onlyFullReindexReuseEEngram

Layer modes from section 4.2.1 of the technical report and the kv_source_layer_ids, index_source_layer_ids and compress_ratios fields in config.json.

890 Bytes of Global KV per Token

The saving has two sources. One is sharing caches across layers; the other is precision: DeepSeek trains the main KV cache to be stored in FP4, as E2M1 values with one E4M3 scale per 16 channels, while the sliding-window cache stays in FP8. Together they put the global KV footprint at 890 bytes per token, 3.9 times smaller than DeepSeek-V4-Flash, the model in our DeepSeek-V4 deployment guide, and 437 times smaller than DeepSeek-V1.

Global KV cache per token across DeepSeek generations

Bytes per token on a logarithmic scale. Each generation cuts the footprint by a large factor.

Chart: global KV cache per token. DeepSeek-V1 389,120 bytes, DeepSeek-V3.2 48,068 bytes, DeepSeek-V4-Flash 3,514 bytes and DeepSeek-V4.1-Flash 890 bytes.

Source: Figure 1(b) of the DeepSeek-V4.1-Flash technical report.

Global KV for one full-length prompt
890 bytes × 1,048,576 tokens ≈ 0.93 GB
Plus a fixed 128-token sliding window per layer. The vLLM recipe notes that on this model the weights and the batch budget, not the cache, set the capacity limit.

For a broader view of where KV cache memory goes and how serving engines manage it, our guide to optimising the KV cache covers the techniques this design builds on.

Engram: 196B Parameters That Are Looked Up, Not Computed

Engram is the module that makes the memory plan work. At layers 1 and 14, the last two, three and four tokens at each position are hashed into two tables of roughly 384 million rows each, and the retrieved rows are gated into the residual stream. A mixture of experts adds capacity through conditional computation; Engram adds it through conditional memory, which the vLLM documentation describes as parameters that are never computed over, only looked up. The two tables hold 196.6 billion parameters, 183.1 GiB in FP8 or about 189 GiB with their block scales, more than a third of the checkpoint.

Because the lookup indices depend only on the input tokens, they are known before the forward pass reaches the layer. vLLM uses that to keep the tables in pinned host memory and read them over unified virtual addressing (UVA), prefetching on a side CUDA stream so the transfer overlaps the computation of the earlier layers. The GPU memory this frees goes to the KV cache.

Where an Engram lookup runs

Hashing and gating happen on the GPU. The tables stay in host memory, and only the rows a token needs cross the PCIe link.

ON EVERY GPUPINNED HOST MEMORYToken idsthe last two tofour tokensHash2-, 3- and4-grams, 8 headseachGatescored against thehidden stateResidual streamadded at layers 1and 14Two Engram tablesabout 384M rows each, 189 GiB with scalesrow indices, knownfrom the tokens aloneonly the rows needed,read over UVA

Mechanism from the Engram page of the vLLM documentation and section 2.4.2 of the technical report. Table sizes from config.json: 384,006,168 and 384,016,682 rows.

DSpark: Five Draft Tokens per Round

DeepSeek-V4.1-Flash drops the multi-token prediction module of earlier DeepSeek models in favour of DSpark, a speculative decoding module trained after pre-training. Three transformer blocks, each with 128 routed experts and 3 active, attend over a 128-token window and compute draft logits for five positions in one pass. A Markov head models the dependencies between those drafts, and a confidence head predicts how likely each position is to be accepted.

The recipe keeps DSpark opt-in, behind one speculative decoding flag, and counts the drafter's experts, roughly 14B parameters, as an addition to the load when it is on. On NVIDIA GPUs, the same flag turns on adaptive verification, which vLLM leaves off by default. It uses the confidence head's predictions to decide how many drafts to check for each request, within a compute budget profiled at start-up.

How DSpark drafts

One pass drafts five tokens. The chance that a draft survives falls with each position, because every draft before it must be accepted too, and the scheduler chooses where to stop checking.

Backbonelayers 37 to 39 feedthe drafterDSparkthree blocks of 128experts, 3 activet+1t+2t+3t+4t+5chance each draft surviveschecked prefixThe scheduler sets how many drafts to check perrequest from those odds and from a compute budgetvLLM profiles at start-up.

From section 2.4.3 of the technical report, the speculative decoding notes in the vLLM recipe and vLLM's adaptive verification page.

What the Published Scores Say

On the 1017 model card, DeepSeek-V4.1-Flash-1017 leads the other open models listed on every benchmark except HLE without tools, where Kimi K3 is 0.9 points ahead; our Kimi K3 deployment guide serves that model on 32 NVIDIA H100 GPUs. Against the closed models the picture is mixed: Opus 5 leads on six benchmarks and GPT-5.6 Sol on ZeroBench, while DeepSeek-V4.1-Flash-1017 leads on DeepSWE v1.1, Automation-Bench, Agents' Last Exam and Apex Bench.

DeepSeek-V4.1-Flash-1017 against open and closed models

Shading ranks each row: the deepest purple marks the leader on that benchmark.

Benchmark DeepSeek 1017 Kimi K3 GLM-5.3 GPT-5.6 Sol Opus 5
HLE w/o tools † 42.6 43.5 42.0 44.5 56.3
Terminal-Bench 4.0 42.3 12.6 37.9 39.9 51.8
DeepSWE v1.1 77.0 67.5 66.9 73.0 74.0
ProgramBench 29.1 17.5 19.0 23.0 37.0
NL2Repo-Bench 68.2 58.0 58.0 56.8 75.3
Automation-Bench 60.5 46.7 48.8 45.8 50.3
Agents' Last Exam 35.4 27.6 28.5 26.7 28.6
Apex Bench v1.1 72.1 47.8 56.6 54.3 65.8
Chartography, tools 83.0 68.1 n/a 79.9 84.0
BabyVision, tools 92.5 85.7 n/a 88.9 94.1
ZeroBench, tools 51.0 41.0 n/a 53.0 52.0

Source: the DeepSeek-V4.1-Flash-1017 model card. n/a marks a score the card does not publish. † The GLM-5.3 HLE figure is for the text-only subset.

The DeepSeek-V4.1-Flash Deployment Architecture on 8 NVIDIA H100 GPUs

The checkpoint is 510.3 GB across 48 safetensors shards, and each NVIDIA H100 PCIe card reports 81,559 MiB of memory. The vLLM recipe calls eight 80 GB cards the smallest NVIDIA node that serves this checkpoint, and only with a set of memory settings. Those settings define the DeepSeek-V4.1-Flash deployment architecture, and the largest of them moves the Engram tables off the GPUs.

What is inside the 1017 checkpoint

Five components, and where each one lives once the server is running.

Component Parameters Stored Lives in
Routed and DSpark experts, MXFP4 557.2B 259.5 GiB GPU memory, across the 8 cards
Engram tables, FP8 196.6B 183.1 GiB Pinned host memory
Attention, dense projections and routers, FP8 7.4B 6.9 GiB GPU memory, across the 8 cards
Embedding and LM head in BF16, norms in FP32 2.0B 3.9 GiB GPU memory, across the 8 cards
UE8M0 block scales 23.6B 21.9 GiB Beside the weights they scale
Total   475.3 GiB 510.3 GB on disk

Component sizes from the memory table in the vLLM recipe. DeepSeek's 552B backbone figure covers the routed experts, attention and embeddings; the Engram tables, the DSpark drafter and the scales sit outside it. The recipe counts the drafter's experts, roughly 14B parameters of the first row, as an addition to the load when DSpark is on.

Host memory takes the two Engram tables together with their block scales, which the recipe puts at 189 GiB. Tensor parallelism splits the remaining weights across the eight cards, with small parts such as the vision encoder and the norms copied to every card instead, and the recipe's NVIDIA H100 notes put the result at about 36 GiB of resident weights per card. vLLM manages 92 per cent of each card:

vLLM's share of each card
81,559 MiB × 0.92 ≈ 73.3 GiB
About 36 GiB of it holds resident weights and 8 GiB the indexer buffer, leaving the rest for the KV cache, activations and CUDA graphs.

Where the checkpoint lives on one node

Engram goes to host memory. The rest is split across the eight cards, with room left on every card for the KV cache.

Host memory1,440 GB
 
 
Engram tables and their scales, about 189 GiB, pinnedFree for the system and the loader
Each NVIDIA H100 PCIe x 8 cards81,559 MiB, about 79.6 GiB
Weights
 
KV cache and more
 
Resident weights, about 36 GiBIndexer buffer, 8 GiBKV cache, activations and CUDA graphs, about 29 GiBOutside the 0.92 budget, about 6.4 GiB
Ephemeral disk6,500 GB
 
Free
Checkpoint, 510.3 GB in 48 shardsFree

Shares calculated from the recipe's component sizes, the 81,559 MiB each card reports, and the 1,440 GB of RAM and 6,500 GB of ephemeral disk the flavour reference lists for this machine.

Why the Batch Budget Is 4,096 Tokens

The sparse-attention indexer allocates a logits buffer at start-up, sized by the number of tokens batched in one scheduler step and by the maximum context length, at two bytes per entry. At the full 1,048,576-token context, a budget of 8,192 tokens would make that buffer 16 GiB on every card. The recipe's NVIDIA H100 profile caps the budget at 4,096 tokens instead, which halves the buffer and keeps the whole context available for long agentic traces.

Indexer logits buffer per GPU
4,096 tokens × 1,048,576 positions × 2 bytes = 8 GiB
vLLM's chunked prefill still takes long prompts, in steps of up to 4,096 tokens.

The profile adds two environment variables that keep the KV pool from fragmenting around that buffer: VLLM_USE_V2_MODEL_RUNNER=1 and PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True.

Inside the Node: Four NVLink Pairs Over PCIe

The 8x NVIDIA H100-80G-PCIe-NVLink flavour bridges each card to one neighbour with NVLink, which Hyperstack rates at 600 GB/s bidirectional on its NVIDIA H100 PCIe page, and reaches the other six cards over PCIe Gen5 through the host bridge. Tensor parallel 8 spans all eight cards, so every all-reduce uses both kinds of link. Our guide to distributed inference with vLLM explains how tensor parallelism splits each layer across GPUs.

Eight NVIDIA H100 PCIe cards, four NVLink pairs

Each pair shares an NVLink bridge; pairs reach one another through the PCIe host bridge.

NV12GPU0GPU1NV12GPU2GPU3NV12GPU4GPU5NV12GPU6GPU7PCIe host bridge (PHB) between every other pair of cardsNVLink bridge, 600 GB/s bidirectionalPCIe Gen5, 128 GB/s bidirectional

The topology nvidia-smi topo -m reports on this flavour. Step 4 prints the same matrix.

The Launch Settings, Flag by Flag

Every engine flag below comes from the command the vLLM recipe generates for NVIDIA H100, apart from the served name and the API key, which turn the server into a private endpoint.

Engine flags

What each flag does on this machine.

--tensor-parallel-size 8
Shards every layer across the eight cards, the smallest NVIDIA H100 configuration the recipe serves.
--engram-config '{"cpu_offload":true}'
Keeps both Engram tables in pinned host memory, read over UVA. It is vLLM's default, set explicitly as the recipe does.
--max-num-batched-tokens 4096
Sizes the indexer buffer at 8 GiB per card with the full context kept.
--gpu-memory-utilization 0.92
The share of each card vLLM manages for weights, buffers and KV cache.
--tokenizer-mode deepseek_v41
The repository ships no Jinja chat template; this mode renders prompts in DeepSeek's V4.1 format in Python.
--reasoning-parser deepseek_v41
Moves the think block into the response's reasoning field.
--tool-call-parser deepseek_v41
Turns the model's DSML tool blocks, DeepSeek's tag format for tool calls, into OpenAI tool_calls.
--enable-auto-tool-choice
Lets the model decide when to call a tool.
--mm-encoder-tp-mode data
Runs the 32-layer vision encoder data-parallel, with a full copy on each card; at hidden size 1,024, tensor parallel communication would cost more than it saves.
--served-model-name deepseek-v4.1-flash
A name without a slash, which Claude Code requires.
--api-key "$VLLM_KEY"
Requires a bearer token on every /v1 route.

Profile values from the vLLM recipe. Flag semantics from the vLLM documentation for reasoning outputs and tool calling.

Environment variables

Set on the container with -e.

VLLM_ENABLE_CUDA_COMPATIBILITY=1
Switches on the image's CUDA 13.0 forward-compatibility libraries for the VM's R570 driver.
VLLM_ENGINE_READY_TIMEOUT_S=3600
Set by the recipe for every GPU type; gives the first load of 510 GB up to an hour to report ready.
VLLM_USE_V2_MODEL_RUNNER=1
Part of the NVIDIA H100 profile, for the memory layout around the indexer buffer.
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
Part of the NVIDIA H100 profile, for the same memory layout.
HF_HUB_OFFLINE=1
The weights are already on disk, so vLLM loads the model without contacting the Hugging Face Hub.

Compatibility mode from the vLLM Docker documentation. The recipe's command builder also sets VLLM_USE_RUST_FRONTEND=1, which selects a Rust API server that vLLM describes as experimental; this deployment keeps vLLM's default Python server.

How to Deploy DeepSeek-V4.1-Flash on Hyperstack, Step by Step

The whole DeepSeek-V4.1-Flash deployment runs on one machine in eight steps. Start the 510 GB download as soon as the machine is active, and pull the container image while it runs.

1
Access Hyperstack
Sign in to the console and activate billing.
2
Deploy the virtual machine
8x NVIDIA H100-80G-PCIe-NVLink, Ubuntu 24.04 with Docker.
3
Open port 8000
One inbound TCP rule, scoped to your own address.
4
Connect and check the GPUs
Eight cards in four NVLink pairs.
5
Download the weights
48 shards to the ephemeral disk.
6
Pull the vLLM image
vllm/vllm-openai:v0.31.0, pinned.
7
Launch vLLM
The recipe's NVIDIA H100 command, plus an API key.
8
Send the first request
17 × 19, answered as 323.

Step 1: Access Hyperstack

Step 2: Deploy a New Virtual Machine

On the Virtual Machines page, click Deploy New Virtual Machine.

Deploy New Virtual Machine button on the Hyperstack Virtual Machines page, the start of a DeepSeek-V4.1-Flash deployment

The Deploy New Virtual Machine button.

Then make six choices in the deployment form.

What to select, and why

The flavour and the image carry the deployment; the rest is access.

Field Selection Why
Flavour 8x NVIDIA H100-80G-PCIe-NVLink, API name n3-H100x8-NVLink 252 vCPUs, 1,440 GB of RAM, a 100 GB root disk and 6,500 GB of ephemeral storage, per the flavour reference. The RAM holds the Engram tables and the ephemeral disk holds the checkpoint.
Environment One in CANADA-1 The region the flavour reference lists for this machine. An environment groups the machine with its keys and network.
OS image Ubuntu Server 24.04 LTS R570 CUDA 12.8 with Docker Driver, CUDA toolkit and Docker come installed, as the image reference describes, so the machine is ready for Docker as soon as you connect.
SSH key Import an existing key or generate one Generating one downloads the private key to your computer. The SSH key guide covers both routes.
SSH access Enabled Adds a firewall rule for TCP port 22.
Public IP Assign Public IP Reaches the machine over SSH and the endpoint over HTTP.

Each choice maps to a field on the Deploy New Virtual Machine page.

Selecting the 8x NVIDIA H100-80G-PCIe-NVLink flavour in the Hyperstack console to deploy DeepSeek-V4.1-Flash

The flavour card for 8x NVIDIA H100-80G-PCIe-NVLink.

Hyperstack OS image list including Ubuntu Server 24.04 LTS R570 CUDA 12.8 with Docker, the image for the DeepSeek-V4.1-Flash vLLM container

The OS image list. Choose Ubuntu Server 24.04 LTS R570 CUDA 12.8 with Docker.

Click Deploy. The machine is ready once its status shows ACTIVE, and billing starts from that state.

Driver and container. The OS image ships the NVIDIA R570 driver, and the vLLM 0.31.0 container carries NVIDIA's CUDA 13.0 forward-compatibility libraries, which VLLM_ENABLE_CUDA_COMPATIBILITY=1 switches on in Step 7. The vLLM Docker documentation lists R570 as a supported host driver for this mode on data centre GPUs such as the NVIDIA H100.

Step 3: Open Port 8000 for the Endpoint

Apart from the SSH rule from Step 2, a new virtual machine accepts no inbound traffic until a firewall rule allows it. Open the machine's details page, go to the Firewall tab and add one inbound rule:

  • Ether type: IPv4
  • Protocol: TCP
  • Port range: 8000
  • Remote IP prefix: your own public address followed by /32
Adding an inbound TCP rule for port 8000 on the Hyperstack Firewall tab for the DeepSeek-V4.1-Flash vLLM endpoint

The inbound rule on the Firewall tab. In the remote IP field, enter your own address followed by /32 rather than 0.0.0.0/0.

Two layers guard the endpoint. The API key from Step 7 protects every route under /v1, and the firewall rule decides who can reach the port at all. The vLLM security guide advises against relying on an API key alone, so keep the remote prefix as narrow as your clients allow.

Step 4: Connect and Check the GPUs

Terminal, your workstationSHELL
# From your workstation, once the virtual machine shows ACTIVE
chmod 600 ~/.ssh/[YOUR KEY]
ssh -i ~/.ssh/[YOUR KEY] ubuntu@[VM PUBLIC IP]

Once the Ubuntu welcome banner appears, confirm what the machine holds before installing anything.

Terminal, the virtual machineSHELL
# Eight cards and their memory, before anything is installed
nvidia-smi --query-gpu=index,name,memory.total --format=csv

# How the eight cards are wired to one another
nvidia-smi topo -m
OutputOUTPUT
index, name, memory.total [MiB]
0, NVIDIA H100 PCIe, 81559 MiB
1, NVIDIA H100 PCIe, 81559 MiB
2, NVIDIA H100 PCIe, 81559 MiB
3, NVIDIA H100 PCIe, 81559 MiB
4, NVIDIA H100 PCIe, 81559 MiB
5, NVIDIA H100 PCIe, 81559 MiB
6, NVIDIA H100 PCIe, 81559 MiB
7, NVIDIA H100 PCIe, 81559 MiB

      GPU0  GPU1  GPU2  GPU3  GPU4  GPU5  GPU6  GPU7  NIC0
GPU0   X    NV12  PHB   PHB   PHB   PHB   PHB   PHB   PHB
GPU1  NV12   X    PHB   PHB   PHB   PHB   PHB   PHB   PHB
GPU2  PHB   PHB    X    NV12  PHB   PHB   PHB   PHB   PHB
GPU3  PHB   PHB   NV12   X    PHB   PHB   PHB   PHB   PHB
GPU4  PHB   PHB   PHB   PHB    X    NV12  PHB   PHB   PHB
GPU5  PHB   PHB   PHB   PHB   NV12   X    PHB   PHB   PHB
GPU6  PHB   PHB   PHB   PHB   PHB   PHB    X    NV12  PHB
GPU7  PHB   PHB   PHB   PHB   PHB   PHB   NV12   X    PHB
NIC0  PHB   PHB   PHB   PHB   PHB   PHB   PHB   PHB    X

Eight NVIDIA H100 PCIe cards at 81,559 MiB each, with NV12 between GPU0 and GPU1, GPU2 and GPU3, GPU4 and GPU5, and GPU6 and GPU7. Every other pair shows PHB, a path through the PCIe host bridge.

Step 5: Download the Weights to the Ephemeral Disk

The root disk is 100 GB, so the Hugging Face cache goes on the 6,500 GB ephemeral disk mounted at /ephemeral.

Terminal, the virtual machineSHELL
# The root disk is 100 GB and the checkpoint is 510 GB, so
# the Hugging Face cache lives on the ephemeral disk
sudo mkdir -p /ephemeral/hf
sudo chown -R ubuntu:ubuntu /ephemeral/hf

# tmux outlives a dropped session; jq reads JSON responses
sudo apt-get update -q && sudo apt-get install -y -q tmux jq
python3 -m pip install -q --break-system-packages \
  -U "huggingface_hub[hf_xet]"
export PATH="$HOME/.local/bin:$PATH"
Terminal, the virtual machine: the downloadSHELL
# Start a named tmux session, then run the download inside it
tmux new -s weights

export HF_HOME=/ephemeral/hf
hf download deepseek-ai/DeepSeek-V4.1-Flash-1017 --max-workers 16

Detach from tmux with Ctrl+b then d, and reattach with tmux attach -t weights. The repository is public under the MIT licence, so the download needs no Hugging Face token. When the command returns, confirm that all 48 shards are present and none is partial:

Terminal, the virtual machineSHELL
# Count the shards and any partial files once the download returns
REPO=/ephemeral/hf/hub/models--deepseek-ai--DeepSeek-V4.1-Flash-1017
SHARDS=$(ls $REPO/snapshots/*/model-*-of-00048.safetensors | wc -l)
PARTIAL=$(find $REPO -name '*.incomplete' | wc -l)
echo "$SHARDS shards, $PARTIAL incomplete"
OutputOUTPUT
48 shards, 0 incomplete

Keep the checkpoint between sessions. Data on /ephemeral does not persist through hibernation, so copy the 510 GB to a shared storage volume, as the ephemeral storage guide describes.

Step 6: Pull the vLLM Image

In a second SSH session, pull the image while the weights download. DeepSeek-V4.1-Flash support arrived in vLLM 0.30.0, and the recipe sets vLLM 0.31.0 as its minimum, so pin that release rather than latest.

Terminal, the virtual machineSHELL
# In a second SSH session, while the weights download
docker pull vllm/vllm-openai:v0.31.0

Step 7: Launch vLLM

Create a key for the endpoint first. Clients send it as a bearer token.

Terminal, the virtual machineSHELL
# A random key for the endpoint, readable by your user only
openssl rand -hex 32 > ~/.vllm_key && chmod 600 ~/.vllm_key
export VLLM_KEY=$(cat ~/.vllm_key)

Then start the container. The engine flags are the recipe's NVIDIA H100 command, with the served name, the API key and CUDA compatibility added.

Terminal, the virtual machine: the launchSHELL
docker run -d --name deepseek-v41-flash \
  --gpus all --ipc=host -p 8000:8000 \
  -v /ephemeral/hf:/root/.cache/huggingface \
  -e HF_HUB_OFFLINE=1 \
  -e VLLM_ENABLE_CUDA_COMPATIBILITY=1 \
  -e VLLM_ENGINE_READY_TIMEOUT_S=3600 \
  -e VLLM_USE_V2_MODEL_RUNNER=1 \
  -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
  vllm/vllm-openai:v0.31.0 \
  deepseek-ai/DeepSeek-V4.1-Flash-1017 \
  --served-model-name deepseek-v4.1-flash \
  --api-key "$VLLM_KEY" \
  --tokenizer-mode deepseek_v41 \
  --tensor-parallel-size 8 \
  --engram-config '{"cpu_offload":true}' \
  --max-num-batched-tokens 4096 \
  --gpu-memory-utilization 0.92 \
  --reasoning-parser deepseek_v41 \
  --tool-call-parser deepseek_v41 \
  --enable-auto-tool-choice \
  --mm-encoder-tp-mode data

The first start reads 510 GB of weights from the ephemeral disk and pins about 189 GiB of Engram tables and scales in host memory before the API opens; VLLM_ENGINE_READY_TIMEOUT_S=3600, set by the recipe, gives that first load up to an hour.

What happens between docker run and the first request

Five stages, in order.

1
The container starts
vLLM 0.31.0 reads the launch flags and environment variables.
2
Eight workers come up
One per GPU, joined into a tensor parallel group of eight.
3
Weights load from /ephemeral
Experts, attention and embeddings are sharded eight ways; the Engram tables are pinned in host memory.
4
Memory is sized
The indexer reserves its 8 GiB buffer, and the KV cache takes what remains of the 0.92 share once activations and CUDA graphs are accounted for.
5
The API opens
Port 8000 accepts requests and /health starts answering.

Stages of a vLLM start-up for this configuration.

Terminal, the virtual machineSHELL
# Stream the engine's start-up in one terminal
docker logs -f deepseek-v41-flash

# In another, poll the health route until it answers
until curl -sf http://localhost:8000/health; do sleep 30; done
echo "vLLM is ready"
OutputOUTPUT
vLLM is ready

Step 8: Send the First Request

List the served model, then send the question the recipe uses as its own check, with thinking off. The correct answer is 323.

Terminal, the virtual machineSHELL
curl -s http://localhost:8000/v1/models \
  -H "Authorization: Bearer $VLLM_KEY" \
  | jq -r '.data[] | "\(.id)  max_model_len=\(.max_model_len)"'
OutputOUTPUT
deepseek-v4.1-flash  max_model_len=1048576
Terminal, the virtual machineSHELL
curl -s http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $VLLM_KEY" \
  -d '{"model": "deepseek-v4.1-flash",
       "chat_template_kwargs": {"thinking": false},
       "messages": [{"role": "user", "content":
           "What is 17*19? Return only the integer."}]}' \
  | jq -r '.choices[0].message.content'
OutputOUTPUT
323

Setting thinking to false in chat_template_kwargs asks for a direct answer. Without it, the server renders the prompt in thinking mode at effort 75. From your workstation, the same request works against http://[VM PUBLIC IP]:8000 once the Step 3 rule is in place.

DeepSeek-V4.1-Flash Inference: Thinking, Effort, Tools and Images

Every DeepSeek-V4.1-Flash inference request follows the same path. The API server checks the key, vLLM's deepseek_v41 prompt encoder writes the conversation in DeepSeek's V4.1 format, the engine runs it across the eight GPUs, and the reasoning and tool-call parsers turn the raw output back into OpenAI fields.

What one request passes through

Six stages, from your client and back again.

Clientyour app, SDK or agentharnessFirewallTCP 8000, from your ownaddressAPI serverbearer key on every /v1routePrompt encoderdeepseek_v41 writes theV4.1 formatEnginetensor parallel 8 oneight NVIDIA H100 GPUsParsersreasoning and DSML toolcalls to OpenAI fields123456OpenAI JSON back to the client

The prompt encoder and parsers are vLLM's implementation of DeepSeek's encoding reference.

Connect a Python Client

The server speaks the OpenAI Chat Completions API, so the official OpenAI SDK works unchanged. DeepSeek recommends a temperature of 1.0 and a top_p of 1.0 for the 1017 checkpoint, as its model card lists.

Python, your workstationPYTHON
# pip install openai, then export VLLM_KEY with the Step 7 key
import os
from openai import OpenAI

client = OpenAI(
    base_url="http://[VM PUBLIC IP]:8000/v1",
    api_key=os.environ["VLLM_KEY"],
)
MODEL = "deepseek-v4.1-flash"

Chat Mode for Direct Answers

With thinking off, the encoder closes the reasoning block before generation starts, so the reply is the answer and nothing else.

Python, your workstationPYTHON
ask = "Write 1,048,576 as a power of two. Expression only."

reply = client.chat.completions.create(
    model=MODEL,
    messages=[{"role": "user", "content": ask}],
    max_tokens=16,
    extra_body={"chat_template_kwargs": {"thinking": False}},
)
print(reply.choices[0].message.content)
OutputOUTPUT
2^20

Thinking Mode and the 1 to 100 Effort Dial

DeepSeek-V4.1-Flash exposes reasoning as a number rather than a handful of tiers. During reinforcement learning, DeepSeek trained the model at a set of effort levels on a scale from 1 to 100, penalising long reasoning less as the level rises, and the report notes that values between the trained levels give interpolated behaviour. In thinking mode, the encoder writes the value into the prompt as a Reasoning Effort line at the start of the conversation. DeepSeek's own API maps its low, high and max tiers to 50, 75 and 100, as section 5.1.4 of the technical report sets out.

On this server, a request that sets neither thinking key runs in thinking mode at effort 75, the default in DeepSeek's encoder and in vLLM 0.31.0. Set thinking explicitly on every request, and add reasoning_effort whenever thinking is on. Give thinking requests room in max_tokens, since the reasoning trace and the answer share one budget and the answer begins only once the trace closes.

One dial from 1 to 100

DeepSeek's API tiers sit at 50, 75 and 100. The report finds that efforts of 60 to 80 recover most of the maximum setting's accuracy.

1255075100lowhighmax60 to 80Reasoning effort, 1 to 100needle at 75, the default when thinking is on

Tier mapping from Table 2 of the technical report and the encoding reference; the 60 to 80 band from section 5.3.2 of the report.

Python, your workstationPYTHON
question = ("A 475 GiB checkpoint is served by 8 GPUs after "
            "189 GiB of it moves to host memory. How many GiB "
            "does each GPU hold? Answer with the number only.")

reply = client.chat.completions.create(
    model=MODEL,
    messages=[{"role": "user", "content": question}],
    temperature=1.0, top_p=1.0, max_tokens=8192,
    extra_body={"chat_template_kwargs": {
        "thinking": True, "reasoning_effort": 60}},
)
msg = reply.choices[0].message
print("reasoning:", msg.reasoning)
print("answer:", msg.content)
OutputOUTPUT
reasoning: Of the 475 GiB, 189 GiB sits in host memory.
That leaves 475 - 189 = 286 GiB for the GPUs, and split
evenly across 8 GPUs that is 286 / 8 = 35.75 GiB each.
answer: 35.75

The reasoning arrives in the reasoning field and the answer in content. The deepseek_v41 reasoning parser makes that split, and the vLLM documentation notes that the field was called reasoning_content in older releases.

What effort 25 and effort 100 buy

Pass@1 at effort 25 and effort 100. The higher setting spends roughly 2.5 times the output tokens.

Chart: Pass@1 at reasoning effort 25 and 100. The average of eight reasoning benchmarks rises from 67.1 to 76.3, DeepSWE v1.1 from 66.0 to 74.2 and Terminal-Bench 2.1 from 82.4 to 90.6.

Source: section 5.3.2 of the technical report, which scores the launch weights. The reasoning line averages eight benchmarks, including GPQA Diamond, HLE, LiveCodeBench and MathArena Apex; DeepSWE v1.1 runs on mini-SWE and Terminal-Bench 2.1 on DeepSeek Harness in Minimal mode.

Efforts of 60 to 80 recover most of effort 100's accuracy at less than half its tokens, while the last step to 100 lengthens agent trajectories by 1.6 to 1.8 times for marginal gains. Effort therefore sets how many tokens each request spends, and so how much of the machine's capacity it uses, with no change to the server.

Tool Calling Through the DSML Parser

DeepSeek-V4.1-Flash writes tool calls as DSML tag blocks rather than JSON. vLLM handles both directions: the encoder wraps your tool messages in tool_result tags, and the deepseek_v41 parser turns DSML blocks into standard OpenAI tool_calls. With --enable-auto-tool-choice, the model decides for itself when to call a tool.

One tool call, two notations

The parser turns the DSML block the model writes into the OpenAI structure your client reads.

What the model writesOUTPUT
<|DSML| calls>
<|DSML| invoke name="get_flavour">
<|DSML| parameter name="name" string="true">n3-H100x8-NVLink</|DSML| parameter>
</|DSML| invoke>
</|DSML| calls>
What your client receives, after the parserJSON
"tool_calls": [{
  "type": "function",
  "function": {
    "name": "get_flavour",
    "arguments": "{\"name\": \"n3-H100x8-NVLink\"}"
  }
}]

DSML format from DeepSeek's encoding reference; tool_calls follows the OpenAI schema.

The example below gives the model one tool that returns the hardware of a Hyperstack flavour, then asks a question it can only answer after calling it.

Python, your workstation: the first turnPYTHON
import json

FLAVOURS = {"n3-H100x8-NVLink": {
    "gpus": 8, "vcpus": 252, "ram_gb": 1440,
    "root_disk_gb": 100, "ephemeral_gb": 6500}}
tools = [{"type": "function", "function": {
    "name": "get_flavour",
    "description": "Hardware of a Hyperstack flavour, by API name.",
    "parameters": {"type": "object", "required": ["name"],
                   "properties": {"name": {"type": "string"}}}}}]
effort = {"chat_template_kwargs": {"thinking": True,
                                   "reasoning_effort": 40}}

messages = [{"role": "user", "content":
             "Will a 510 GB checkpoint fit on the ephemeral disk "
             "of n3-H100x8-NVLink? Look the flavour up first."}]
reply = client.chat.completions.create(
    model=MODEL, messages=messages, tools=tools, extra_body=effort)
call = reply.choices[0].message.tool_calls[0]
print(call.function.name, call.function.arguments)
OutputOUTPUT
get_flavour {"name": "n3-H100x8-NVLink"}
Python, your workstation: the tool result and the answerPYTHON
msg = reply.choices[0].message
messages.append({"role": "assistant", "content": msg.content,
                 "reasoning": msg.reasoning,
                 "tool_calls": [call.model_dump()]})

result = FLAVOURS[json.loads(call.function.arguments)["name"]]
messages.append({"role": "tool", "tool_call_id": call.id,
                 "content": json.dumps(result)})

final = client.chat.completions.create(
    model=MODEL, messages=messages, tools=tools, extra_body=effort)
print(final.choices[0].message.content)
OutputOUTPUT
Yes. n3-H100x8-NVLink has 6,500 GB of ephemeral storage,
so a 510 GB checkpoint fits with about 5,990 GB to spare.

Passing the assistant turn back with its reasoning keeps the model's plan intact across the call. When a conversation declares tools, DeepSeek's encoder keeps the reasoning from every turn rather than dropping earlier traces, so the model can follow one plan through several calls.

Image Input

Images go in as image_url content parts, the format vLLM's multimodal input guide documents. vLLM fetches each image, runs the 32-layer vision encoder and places the visual tokens where the image sits in the prompt. Each image costs up to 1,024 tokens, as the vLLM recipe notes, and the 3 by 3 pixel-unshuffle supports inputs up to about 1,344 by 1,344 pixels. The request below asks the model to read DeepSeek's own KV cache chart from the DeepSeek-V4.1-Flash model card.

Python, your workstationPYTHON
chart = ("https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/"
         "resolve/main/assets/dsv41_kv_cache.png")
question = ("Which model on this chart has the smallest KV cache "
            "per token, and how much smaller is it than the next?")

reply = client.chat.completions.create(
    model=MODEL,
    messages=[{"role": "user", "content": [
        {"type": "image_url", "image_url": {"url": chart}},
        {"type": "text", "text": question},
    ]}],
    max_tokens=512,
    extra_body={"chat_template_kwargs": {"thinking": False}},
)
print(reply.choices[0].message.content)
OutputOUTPUT
DeepSeek-V4.1-Flash has the smallest global KV cache per
token, at 890 bytes. The next smallest is DeepSeek-V4-Flash
at 3,514 bytes, so V4.1-Flash is about 3.9 times smaller.

Keep one text request and one image request in your deployment checks, since the vision encoder is a separate path through the model.

Connect an Agent Harness to DeepSeek-V4.1-Flash

DeepSeek scored DeepSeek-V4.1-Flash in eight harness configurations from six families, with the checkpoint and decoding settings held fixed, and reports that its agentic behaviour carries across them. You can therefore pick the harness that fits your own workflow.

The same model in eight harnesses

Resolved rate on DeepSWE v1.1 and Pass@1 on Terminal-Bench 2.1, at maximum effort. Switch between the two benchmarks.

 
Chart: DeepSWE v1.1 resolved rate by harness. mini-SWE 74.2, DeepSeek Harness Minimal 72.6, DeepSeek Harness Standard 70.5, Claude Code 69.8, DeepSeek Harness PTC 67.6, Pi 66.2, Codex 65.6 and OpenCode 65.5.

Source: Table 4 of the technical report, which scores the launch weights. Eight samples per task on DeepSWE v1.1 and three on Terminal-Bench 2.1, a 1M-token context, a temperature of 1.0 and a top-p of 0.95.

vLLM serves the Anthropic Messages API beside the OpenAI one, so Claude Code can use this endpoint directly. Point it at the server and map every model tier to the served name:

Terminal, your workstationSHELL
# On your workstation, with Claude Code installed
export ANTHROPIC_BASE_URL="http://[VM PUBLIC IP]:8000"
export ANTHROPIC_AUTH_TOKEN="[YOUR VLLM KEY]"
export ANTHROPIC_API_KEY="[YOUR VLLM KEY]"
export ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4.1-flash"
export ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4.1-flash"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4.1-flash"
claude

As its environment variable reference states, Claude Code sends ANTHROPIC_AUTH_TOKEN as a bearer token, which the server's API key check accepts. Harnesses that speak the OpenAI API take http://[VM PUBLIC IP]:8000/v1 as the base URL and the same key.

Tuning DeepSeek-V4.1-Flash on vLLM

Turn On DSpark Drafting

To enable DSpark, add the recipe's speculative decoding flag as the last line of the launch command, with a backslash at the end of the line before it:

Addition to the Step 7 launch commandSHELL
# Append to the end of the Step 7 launch command
  --speculative-config '{"method": "dspark",
    "num_speculative_tokens": 5,
    "draft_sample_method": "probabilistic",
    "rejection_sample_method": "block",
    "enable_adaptive_verification": true}'

It drafts five tokens per round, the block size DSpark was trained on, and turns on adaptive verification on NVIDIA GPUs. How many drafts are accepted depends on how predictable your traffic is, so measure the acceptance rate on your own prompts before adopting it.

Serve Text Only

For text-only traffic, replace --mm-encoder-tp-mode data with the flag below. It skips the vision encoder and its aligner and frees that memory for the KV cache; the two flags cannot be used together.

Swap in the Step 7 launch commandSHELL
# In place of --mm-encoder-tp-mode data, for text-only traffic
  --language-model-only

Size the Context to the Workload

The indexer buffer grows with the context limit as well as the batch budget. A workload that never needs a million tokens can set --max-model-len lower, and the memory the buffer gives up goes to the KV cache.

Indexer buffer at a 262,144-token context
4,096 tokens × 262,144 positions × 2 bytes = 2 GiB
Against 8 GiB at the full 1,048,576-token context.

DeepSeek-V4.1-Flash Deployment Cost

A DeepSeek-V4.1-Flash deployment on one machine comes down to one hourly GPU rate. Hyperstack lists NVIDIA H100 NVLink at $2.80 per GPU hour on demand and from $1.82 per GPU hour reserved on its GPU pricing page, and this machine carries eight cards. The public IP the endpoint needs is listed separately on the same page, at $0.00672043 per hour. Billing runs per minute, as the billing policies set out, and starts once the machine is ACTIVE, as the getting started guide notes.

The 8x NVIDIA H100-80G-PCIe-NVLink machine, priced

One machine carries the whole deployment, so these rows are the full GPU bill.

Pricing Per GPU hour Per hour Per day Per 730-hour month
On demand $2.80 $22.40 $537.60 $16,352.00
Reserved, from $1.82 $14.56 $349.44 $10,628.80

Per GPU rates from the Hyperstack GPU pricing page, multiplied by eight GPUs, then by 24 hours and by 730 hours. On demand, a minute costs about $0.37.

What a month of runtime costs

Drag the slider to the hours the machine runs. Billing is per minute, so a partial hour costs only the minutes used.

 
Chart: cost of the 8x NVIDIA H100 machine for a chosen number of hours. At 730 hours, on demand at $22.40 per hour is $16,352.00 and reserved from $14.56 per hour is $10,628.80.

On-demand and reserved rates for eight NVIDIA H100 NVLink GPUs, from the pricing page.

Three Levers on the Bill

What moves the cost, and how

One lever is a commitment, one is a per-request setting and one is a habit.

Lever Effect
Reserved pricing From $1.82 against $2.80 per GPU hour, 35 per cent lower, for an endpoint that runs continuously.
Reasoning effort Sets how many tokens each answer spends, and so the cost of each answer on a machine billed by the hour. DeepSeek finds most of the maximum accuracy between 60 and 80, at under half the tokens of 100.
Hibernation between sessions This flavour supports hibernation, which bills only the root disk while the machine is paused. Keep a copy of the checkpoint on a shared storage volume, because /ephemeral does not persist through it. Shared storage is listed at $0.000096774 per GB per hour, about $0.05 per hour for the 510 GB checkpoint.

Hibernation support and billing from the flavour reference; storage behaviour from the ephemeral storage guide; the shared storage rate from the GPU pricing page.

Why self-host a model that DeepSeek also serves as an API? The MIT licence lets you run the weights on a machine you control, so your prompts and every response stay inside your own environment. You set the context length and the parsers at launch and the effort on every request, and the machine costs the same per hour however many tokens it serves. For a primer on the serving engine itself, see what vLLM is and how it serves models.

Why Deploy DeepSeek-V4.1-Flash on Hyperstack?

Hyperstack is a cloud platform built for AI and machine learning workloads. Here is what a single-node DeepSeek-V4.1-Flash deployment needs from a provider, and how that maps onto the platform:

Eight NVIDIA H100 GPUs in One Machine
The 8x NVIDIA H100-80G-PCIe-NVLink flavour serves the 1017 checkpoint with about 36 GiB of resident weights per card, and NVLink bridges each pair of cards at 600 GB/s bidirectional.
1,440 GB of Host Memory for Engram
Room to pin both Engram tables and their scales, about 189 GiB, with most of the machine's memory still free, per the flavour reference.
6,500 GB of Ephemeral Storage
The ephemeral disk holds the 510 GB checkpoint more than twelve times over, on the same machine as the GPUs that read it.
Docker-Ready Ubuntu Images
Ubuntu Server 24.04 LTS R570 CUDA 12.8 with Docker goes from SSH to docker run with no driver work.
Per-Minute Billing and Reserved Rates
$22.40 per hour on demand, from $14.56 reserved, billed by the minute.
Firewall Rules per Machine
One inbound firewall rule scopes the endpoint to your own address.

Run DeepSeek-V4.1-Flash on your own GPUs

Deploy DeepSeek-V4.1-Flash on 8x NVIDIA H100

One virtual machine, the vLLM recipe's NVIDIA H100 configuration and a private endpoint with thinking, tool calls, image input and the full one-million-token context, from $22.40 per hour on demand.

8x NVIDIA H100 80 GB1,048,576-token contextvLLM 0.31.0$22.40 per hour

Launch an NVIDIA H100 virtual machine on Hyperstack today.

FAQs

What is DeepSeek-V4.1-Flash-1017?

DeepSeek-V4.1-Flash-1017 is an updated release of DeepSeek-V4.1-Flash, a multimodal mixture-of-experts model with 552B backbone parameters. It activates 8B parameters per prompt token and 16B per generated token, holds 1,048,576 tokens of context and ships under the MIT licence.

What hardware do you need to deploy DeepSeek-V4.1-Flash?

DeepSeek-V4.1-Flash needs one node of eight 80 GB GPUs, the smallest NVIDIA configuration the vLLM recipe serves. Its 475 GiB checkpoint fits once the Engram tables and their scales, about 189 GiB, move to host memory, leaving about 36 GiB of resident weights on each NVIDIA H100.

How much does a DeepSeek-V4.1-Flash deployment cost on Hyperstack?

An 8x NVIDIA H100-80G-PCIe-NVLink machine costs $22.40 per hour on demand, or from $14.56 per hour reserved, billed per minute. The whole deployment runs on that one machine, so one hourly rate covers every GPU.

How do you control thinking on DeepSeek-V4.1-Flash?

Send chat_template_kwargs with thinking set to true or false and, when thinking is on, a reasoning_effort integer from 1 to 100 in the same object. With neither key set, vLLM 0.31.0 runs thinking mode at effort 75.

Does DeepSeek-V4.1-Flash support tool calling and images on vLLM?

Yes. With the deepseek_v41 tool parser and auto tool choice, the tag blocks the model writes for tool calls arrive as OpenAI tool_calls, and image_url content parts run through its 32-layer vision encoder at up to 1,024 tokens per image.

Fareed Khan

Fareed Khan

calendar 21 Oct 2026

•

Read More

Create Your Account

From hardware to inference, one unified platform to scale your AI workloads.