Accelerating a Custom Chat on DGX Spark: What Made Inkling and Qwen Effective

Accelerating a Custom Chat on DGX Spark: What Made Inkling and Qwen Effective

In our proprietary chat on DGX Spark, reducing how many times the same input is re-read and how many tokens are generated to answer simple questions shortened the wait time. On the task of extracting three dates from a sales notice, Inkling answered all three correctly both before and after the change. The generation speed stayed at about 29 tokens per second, while the time to complete the answer went from 11.80 seconds to 3.14 seconds.

When the same settings were applied to ledger reconciliation, the trade-off this time was fewer correct answers in exchange for speed. For developers operating local LLMs, the hard part isn't lowering the settings values—it's identifying for which questions that change can be used. Drawing on comparisons run with Inkling and Qwen from November 22–26, 2026, we present where the waiting happens, how to verify correct answers, and why we held off adopting a faster setting even when it was faster.

Where Does the Wait Happen in Custom Chat?

Where Does the Wait Happen in Custom Chat?

The subject is a chat application developed in-house. Search and document retrieval are handled by the app, while text generation is handled by the model running on DGX Spark. The time to answer includes time spent outside the model as well.

Distinguishing First Content, Generation Completion, and Screen Display

It's hard to answer a complaint of "the chat is slow" with just one clock. Sometimes you wait from sending the question until the first character appears; other times the body text appears quickly but takes a long time to finish reading to the end. When a web search is needed, there's a sequence: reasoning about what to search for, retrieving the document, and generating an answer based on the retrieved text. Behind a single response, there can be multiple rounds of reasoning.

So we distinguished between the time for the model to read the input, the time until the first answer text is received, and the time until the answer finishes. When tools are used, we counted the input and generation for each round; only for the tests operated through the screen did we measure from submission acceptance to when the body text appears. The intermediate thinking progress and the first character of the answer body that the user can read are also different points in time. Where the table says "body start," it generally refers to the time the chat side received the first body text.

For example, even if the search decision finishes in 3 seconds, that doesn't mean the answer reaches the user in 3 seconds. Conversely, if a tool call can be skipped entirely, the wait time changes even if the model's per-second generation speed stays the same. If you want to run the same comparison yourself, it helps to first pick one slow scenario and write down in one line exactly where to where you measured with the clock.

For Speed Comparisons, Prepare the Same Materials and Correct Answers

The dates, inventory, ferry, and ledger tasks used here are verification tasks for which the correct answer can be determined. Before/after comparison on a single task, scoring across multiple questions, and submissions from an actual screen each serve a different role. For date extraction, after confirming all three dates are correct, you can compare the generation volume and the number of seconds. For the ledger, in addition to the amount, the rows that were adopted and the rows that were excluded can also be scored.

Most before/after comparisons are a single run per condition, and the seconds reported in the article are the observed value for that run. On the other hand, in tables listing the median across multiple questions, we noted how many questions that figure represents. The distinction between "25 items" correct and "25 questions" correct also matters. If a single question requires answering three things—quantity, amount, and target ID—only part of it may be correct. You need to read both the overall score and where exactly it went wrong.

The hardware used was NVIDIA DGX Spark. Below, we distinguish between Inkling's official configuration, the Inkling configuration chosen for chat, and Qwen's 27B/Q8 configuration. The figures in the body text are values measured on our own tasks. The hardware specifications can be checked in NVIDIA's product materials.

Changing Input Order Shortened the Search Decision on the Second Question

Changing Input Order Shortened the Search Decision on the Second Question

Even without greatly reducing the number of characters passed to the model, if the same leading portion as the previous time can be reused, the read time shortens. The places where a difference actually appeared were in where the date/time is placed and in when the tool list is passed.

Put History First, Place the Ever-Changing Timestamp Last

In the continuation of the same conversation, most of the previous question and answer remain unchanged. However, inserting the current date and time before that creates a different input near the beginning compared to last time. Since both the date/time and the history were necessary for the search decision, we kept both this time. The only thing we changed was the ordering.

We sent two questions in succession to the same history, and measured, once each for the old version and the modified version, up to the point where the official Inkling decides whether a search is needed for the second question. Both cases requested a search targeting the same museum.

Measurement item for question 2Date/time before historyDate/time after history
Input token count7,7707,775
Reused input token count07,643
Input preprocessing17.42 sec0.64 sec
Search decision completed20.29 sec3.29 sec

The modified version has 5 more input tokens, yet it avoided re-reading most of it. Even with the same modified version, the first decision—where the history could not yet be reused—took 20.53 seconds. If we interpret this as having become lighter from the start, this difference cannot be explained. Separating the first query from repeat queries in the count is a necessary condition for verifying the effect of this measure.

The input cache referred to here differs from a mechanism that simply displays a previously generated answer as-is. It uses the computed results of the shared input portion, while generating new output for the current question. An explanation of the mechanism can also be found in vLLM's documentation on automatic prefix caching.

Fix the Search Tool Definition from the Start

In the work mode where search is available, the model is given "what operations can be called" along with the arguments for each operation. The old version added web search and page-content retrieval only when they became necessary. Although this kept the initial input small, every time the model tried to look for materials, the tools section would change, and sometimes the long history that followed it had to be re-read as well.

In the official Inkling's work mode for handling long text, whenever search is enabled, the necessary definitions are now passed from the very first inference. In a task asking for the opening hours of a fictional facility, both the old and new versions performed one search and correctly answered 11 o'clock. What we want to compare is what could be reused in the same second inference. The old version reused 0 out of 12,331 input tokens, while the new version reused 12,270 out of 12,427.

The total time for the work-side input loading, excluding the first attempt, dropped from 30.62 seconds to 0.70 seconds. However, the number of inferences used for the work itself also dropped from 3 to 2. Also, in the new version's first attempt, part of the cache from the immediately preceding trial remained. For this reason, we do not treat the overall app duration ratio as representing the effect of caching alone. Comparing the input denominator and the reuse count within the same call narrows down what change was actually measured.

Solve Easy Tasks Quickly, Leave Room to Think on Hard Matching Tasks

Solve Easy Tasks Quickly, Leave Room to Think on Hard Matching Tasks

Generation includes not only the answer visible to the reader, but also the tokens the model uses before arriving at that answer. Lowering the upper limit is advantageous when the same answer can still be reached. What counts as a failing omission was decided on a per-task basis.

Date Extraction and Day-of-Week Calculation Reduced Different Amounts of Work

For a task of extracting three dates from a business notice, we gave the same text to the official Inkling, without using the input cache, and compared each condition once. Without specifying a thinking limit, it took 10.50 seconds to start the body text and 11.80 seconds to complete. With the thinking limit set to 32 tokens, starting the body text took 1.84 seconds, and completion took 3.14 seconds. The 32 here is a limit on thinking, not a limit on the total generation including the answer.

The generation speed changed only slightly, from 28.43 to 29.24 tokens/sec, whereas the total generation amount dropped from 316 to 76 tokens. In other words, 240 fewer tokens were produced before arriving at the same answer of three dates. When suspecting slowness in how long it takes for the first answer to reach the screen, it is worth checking not just the length of the answer text, but also how many tokens were generated before it.

When the year, month, and day are already fixed and only the day of the week is needed, there is yet another approach. For a task asking for the day of the week for December 29, 2026, the conventional route that selects a work target performed one inference, taking 13.187 seconds, and answered Tuesday. The modified version, which computes it via a calendar, used zero inference and returned the same day of the week in 1.446 milliseconds. What was measured was the question branching and calculation processing, not the screen display or history saving. This shortcut has not been applied to questions involving holiday explanations, multiple requests, or questions that explicitly request a search.

For 18 Hard Questions and 6 Matching Questions, Measure the Effect of More or Less Thinking on Correctness Too

For the official Inkling, we selected 18 questions from the set of problems that showed differences in a prior comparison, and re-solved each one once while varying the thinking strength. Temperature was set to 1.0, and the output limit was fixed at 16,384 tokens throughout. The results did not follow the pattern of "the higher the strength and the more persistence, the more correct answers."

Thinking strengthCorrectCut off at limitMedian completion time per question
0.912/184 cases345 sec
0.717/181 case262 sec
0.215/180 cases128 sec

In this set, 0.7 produced the most correct answers. At strength 0.9, there were 4 questions where the output budget was used up entirely. The p-value for the paired comparison of correct answers between 0.9 and 0.7, matched per question, was 0.125, which is not a difference strong enough to say this ranking would hold with a different sample. Qwen, used as a comparison, answered 14 out of the same 18 questions correctly. This does not allow us to determine an overall ranking across models.

The experiment of varying thinking strength and the experiment of setting an upper limit on thinking token count are separate matters. When scoring 25 items across 6 verification/calculation questions in a different Inkling configuration, a fixed limit of 32 got 18 items correct, with a median of 2.20 seconds. Automatic switching based on the question got all 25 items correct, at 12.41 seconds. For tasks that simultaneously ask about deadlines, quantities, amounts, and so on, only by placing side by side how many seconds were saved and which items became incorrect can a judgment be made.

Don't Let the Same Decision Repeat After Tool Results Return

To check inventory, the model needs to read which item was asked about, call the lookup tool, and link the returned number to the correct item before answering. Along the way, the model is called twice. We prepared two paths: one that passes only the result, and one that passes the tool call corresponding to that result along with the immediately preceding reasoning, as a continuation of the same task.

Using the official Inkling, we looked up fictitious inventory, measuring the portion after receiving the tool result once under each condition. In both conditions, the correct item was looked up first, and 29 units in stock was returned at the end. The amount of generation used for the continuation ranged from 74 to 33 tokens, and the time taken went from 2.774 seconds to 1.357 seconds. Since both conditions answered the correct item, we can compare the reduction seen in the latter half.

These figures apply to a single inventory lookup in a configuration capable of handling tools. They cannot be added to the overall waiting time for a sequence that includes search, nor to chat questions that don't use tools. In the implementation, we also distinguished between handing off to an in-progress lookup and the history retained for a conversation reopened at a later date. Endlessly adding past reasoning increases the input itself and makes it harder to tell which lookup an answer corresponds to.

Carry Search-Collected Content Through as Valid Evidence to the Answer

Carry Search-Collected Content Through as Valid Evidence to the Answer

In web search, we found two places related to speed and accuracy: refetching pages that had already been received, and cases where, even though a page had been read, the numbers or statements needed to answer the question ended up missing from the final excerpt.

Measure Additional Page Retrieval and Answer Generation Time Separately

Some search services return the page body along with the search results. So, when reading the same page again during processing of the same question, we used the body text already obtained. When we tested the fetching process with fixed material containing the body text, additional HTTP fetches for the same page dropped from 1 to 0. When only a short description is available, or when the date or measurement specified in the question is missing, the body text is fetched as needed.

Separately, we conducted an answer test using a fictitious ferry report. We had the model answer, based on an investigator's announcement, the number of cancelled sailings, the announcement date, and whether the operator's responsibility had been determined. The old version was able to answer "responsibility is under review," but could not confirm the number of cancelled sailings or the announcement date. Even though it could cite its source, the two necessary values were missing from the excerpt it had been given.

In the version where excerpts were reselected so that the numbers, dates, and statements relevant to the question were retained, the model answered all three points—"27 sailings cancelled," "announced November 18," and "the company's responsibility is under review"—with sources cited. With the search response fixed and only answer generation run on the actual model, the completion time for one run each was 14.595 seconds for the old version and 10.997 seconds for the new version. This timing does not include actual search wait time. The roughly 3.6-second difference should not be converted into time saved by skipping one round of communication.

In a separate piece of material dealing with unpublished information, neither version fabricated a reopening date for the archive; both answered that it was not yet announced. This is an example of distinguishing between the retrieval date and the reopening date. Rather than passing simply because a single date remained, cross-checking down to "who said it, and about what, on what date" also reveals the risk of adopting an incorrect basis.

Set a Limit Only on Retrying Additional Investigation

After a search, there is a judgment to be made: answer with the current material, search further, or go fetch the body text of a specific page. When that judgment is cut off midway, it is retried exactly once. This time, we set the thinking limit to 64 tokens for retries only. The thinking configuration for the final answer that writes the body text remains as before.

Retry scenarioBefore changeAfter change
The answer can be corrected using already-fetched materialChose additional search in 8.04 secondsChose an answer using already-fetched material in 2.15 seconds
The required measurement is not found in the excerptRequested the body text of the relevant page in 2.71 secondsRequested the same body text in 2.74 seconds

In each case, we reproduced the initial search and the cutoff of judgment, used the same material, and had the actual model make the retry judgment once each. In the top row, both the time taken and the next action changed. In the bottom row, it is also meaningful that the two times are nearly the same. If every judgment were hastily pushed toward "answer right now," searches might be cut off even when there isn't yet sufficient evidence. What the bottom row confirms is only that both versions were able to request the necessary body text. We did not measure the wait time for the initial search or the average effect across all questions.

Even with Correctly Formatted JSON, Verify the Total Amount and Target Rows

Even with Correctly Formatted JSON, Verify the Total Amount and Target Rows

What the ledger and the code had in common was that if the subject is mistaken for another partway through reaching an answer, the error is hard to notice by looking only at the final calculation or text. In the ledger, we cross-checked the original row; in the code investigation, we cross-checked the definition against the actual call site.

Wrong Answers with Only Correct Quantity vs. Only Correct Total

We tested whether a verification-prompting instruction and a JSON Schema specifying the output structure could get even the values right. Four matching/aggregation questions were submitted to Inkling's native API, and 16 items were scored. At the time, the compatible connection for the proprietary chat did not forward the Schema to the model, so this comparison reflects results from requests sent directly to the engine.

ConditionCorrect itemsResponses where all items were correct and the format was followed
Thinking cap 25610/162/4
Same cap plus verification instruction10/161/4
Same cap, verification instruction, JSON Schema11/161/4

Under all conditions, all four questions were answered in the specified JSON format. For the monetary question, even though the quantities of 9 and 5 units were correct, the answer gave 1,380 yen where 1,410 yen was correct. This can be checked by re-adding 9×90 yen and 5×120 yen. However, for the delivery table question, the answer dropped rows that should not have been excluded from the target set, returning "East 9, West 5, total 14." No matter how many times you re-add 9 and 5, you get 14. What needs to be detected here is not an addition error, but a row dropped before counting even began.

To address this, we added processing to the app that, for delivery notes and delivery tables in the corresponding format, extracts the row IDs and reasons for inclusion or exclusion, and cross-checks quantities, unit prices, returns, and the latest status. In two questions sent with search turned off from the actual VS Code screen, the delivery note matched: X at 9 units, Y at 5 units, totaling 1,410 yen. The delivery table matched: East 6, West 16, total 22, with both excluded IDs also matching correctly. From submission to completion, these took 11.036 seconds and 22.836 seconds respectively. The latter two are observed values from the screen after introduction, and do not represent a speed difference from before introduction.

This calculation does not apply when the unit price is unknown, when the same row is contradictory, or when the exclusion conditions in the request carry a different meaning. By clearly specifying the usable formats, we can narrowly and accurately describe the scope guaranteed by a check that confirms "the total matched." For the mechanism describing data structure and constraints, see the explanation of JSON Schema.

Investigating Qwen's Unused API Requires Reading Inside Conditional Branches

In the task of finding unused APIs, simply listing definitions might make it seem like every candidate is visible. However, when the UI side routes calls through variables or switches calls depending on the type of operation, a simple string match misses usage sites. In this case too, the old version counted not only the two correct cases but also a DELETE called from a conditional branch as unused.

What was changed is the procedure used when a request asks to investigate unused code. It now maps definition lines to call lines, traces through variables and branches, and only then judges something as unused. Using Qwen 27B, Q8, with the same 262K context length configuration, the same task was run once before and once after the change.

Measurement itemBefore changeAfter change
Correctly identified unused APIs2/22/2
Cases marked unused while still in use10
Times flagged for re-reading the same location81
Tool executions2219
Completion time189.2 sec146.6 sec

Judging only by the score of having found 2 correct cases, the old and new versions tie. But from the standpoint of someone actually cleaning up code, it is far more problematic to be told that an operation still in use can be deleted. For this reason, the number of excess items flagged was given its own column. In this trial, the time also decreased, but whether the same number of seconds can be saved on a different codebase has not been verified.

Measure Prefetch Generation and Long-Text Input by Use Case

Measure Prefetch Generation and Long-Text Input by Use Case

For code continuations versus Japanese prose, even with the same model reading ahead on a draft, the length that was adopted differed. In the long-input test as well, we separately checked input processing speed, memory usage, and whether content was correctly extracted from a large input.

This Time, Prefetching Sped Up Code but Slowed Down Japanese Text

In speculative decoding, the model verifies a continuation prepared in advance, and the tokens that pass verification are advanced together in a batch. For tasks where the draft matches well, a single verification is enough to move forward. When there are many mismatches, more time is spent generating and verifying drafts. Using the official Inkling vLLM configuration, with the same task, thinking intensity 0.2, and an output cap of 1,500, we compared generation speed across two runs for each condition.

TaskNo lookaheadLookahead 7
Code generation37.8 tokens/sec58.8–79.1 tokens/sec
Japanese prose generation38.3–38.4 tokens/sec24.0–24.5 tokens/sec

For Japanese prose, the length of draft adopted in a single pass stayed at only 1.2–1.6 tokens. If, looking only at the code figures, lookahead 7 were applied to every conversation, the Japanese prose in this case would see longer wait times. In an additional comparison using lookahead 3, code came to 64.8–65.1 and Japanese prose to 28.6–30.6 tokens/sec. A middle value is one option for balancing the load of both, but for this Japanese-language task, no lookahead was fastest.

The metric in this comparison is how many tokens progressed per second during generation. It is not a value that captures the overall response time of a chat session—including search waits and document loading—nor the accuracy rate of the generated code. Users writing prose and users wanting code completion will differ even in which task they use to evaluate the same setting.

The Speed of Reading 32K Tokens vs. the Ability to Handle 520K Tokens

When reading in roughly 32,000 tokens on the official Inkling, the llama.cpp configuration took 100.8–101.2 seconds, while the vLLM configuration with lookahead 7 took 13.7–19.8 seconds. The two configurations also differ in the format of the model weights. Therefore, it cannot be said that this difference is purely a difference in inference engines, nor that setting lookahead 7 alone would produce the same ratio. What can be compared is the input processing of the two combinations that were tested.

Within the llama.cpp configuration, using the same 32,312-token input and a context length of 65,536, we varied the microbatch—the unit processed at one time. At 512, input processing was 320.9 tokens/sec, with GPU process memory usage at 30,727 MiB. At 128, it was 319.2 tokens/sec, with 25,762 MiB. Under this condition, memory usage could be lowered while nearly preserving speed. To judge the effect of reducing this value, the input length and context window need to be held constant.

In a separate 512K configuration of Inkling, both the identifiers at the beginning and end could be extracted from a synthetic document of 519,923 input tokens. It took 491.7 seconds to reach the first body text, and 492.5 seconds to completion. While it is certain that the long input was accepted and correctly extracted, a wait time of roughly 8 minutes was also recorded at the same time. This did not measure the problem of finding contradictions scattered throughout the full text, nor the problem of summarizing accurately. When deciding whether to adopt long-context input, it is worth varying the test depending on whether what is needed is extracting information from the edges, or cross-referencing multiple locations.

A Change That Was Fast but Not Shipped

A Change That Was Fast but Not Shipped

Even just reordering the input while keeping the same model, the results looked different between the first trial and the follow-up test. We decided on the criterion for the reduction rate in advance, and included not only the faster runs but also the runs that lost correctness or format in the selection.

Fixing Attachment Order Alone Shortened Follow-Up Questions by Only 11.9%

Placing the long document first and changing only the user's question at the end would seem to allow the document's ingestion to be reused from the second question onward. In the initial test, there were runs in which many tokens were reused when the same document was repeated. On the other hand, when two first-time questions were sent in a row, there were also cases where almost nothing could be reused, regardless of whether the document was placed first or last. A retest that sends completely identical requests must be distinguished from actual use in which different questions are asked about the same document from different angles.

In the follow-up test, we used both orders—old version to new version, and new version to old version—comparing 2 conversations per condition, 3 questions per conversation, for a total of 12 responses. The code, date, and specified JSON format at the beginning, middle, and end of the document were correct in all responses. The first response-body receipt for the re-question was recorded in 4 cases for each version; the median went from 4.852 seconds to 4.2765 seconds, a reduction rate of 11.86%. The input reused for a different question was 128 to 64 tokens, and the runs that reattached the document were 8,320 tokens for both.

The adoption criteria set in advance were that reuse would increase even for different questions, and that waiting time would shorten by 20% or more. This time, neither condition was met, so we shelved the proposal to uniformly change the input order. Both the observed 11.9% reduction and the lack of increase in reuse remain as results in the same table.

Limits Revealed by Day Rollover, Translation, and Model Changes

The method of leaving the previous date and time as-is in the conversation shortened the body response start from 10.13 seconds to 2.89 seconds for one set of long re-questions. However, in a problem spanning across days where the model had to answer the current date/time and document code in JSON only, no body was returned with an output limit of 128. When the limit was widened to 1,024, the date/time and code became correct, but an explanation was added, deviating from the specified format. The normal history, at the same 1,024 limit, satisfied the date/time, code, and format all at once. For tasks involving date and time, this difference matters greatly.

For short translations, in the first 2 questions with the thinking limit lowered from 32 to 8, both conditions preserved the translation and format, and the median completion time went from 2.01 seconds to 1.38 seconds. In the additional 3 questions, 8 was still faster, but it added a date explanation that was not requested, in a sentence that was not a negative-form translation. For users who want to paste the translated text into a separate input field, this adds the extra work of deleting that sentence. Since it needs to pass with "translation only," we kept 32.

Switching the model itself is also not included among the speedup achievements. When we sent 6 short questions, twice each, with no history and a thinking limit of 32, to both Inkling's official configuration and the comparison configuration, the median completion times were 5.073 seconds and 5.080 seconds, and the correct-answer counts were 44/50 and 39/50. There were differences in load and execution order at the time of measurement. Which model is selected first in chat is an operational decision, and since the two times were nearly the same, we did not conclude that speed had improved from this comparison.

What to Log in Your Own Chat to Make a Judgment

What to Log in Your Own Chat to Make a Judgment

The first step is to decide, for questions that are actually causing trouble, the range for correctness and waiting time. For a re-question with long input, record the token count shared with the previous one; for a short question that takes a long time before the body appears, record the number of generated tokens; for search, record whether the necessary body was actually retrieved. By narrowing the issue down to one, it becomes easier to confirm, on the same hardware, which part of a change was effective.

The way results are kept also differs. For a ledger, record the total and the rows of adoption/exclusion; for code, record the number of unused items, correctly judged items, and incorrectly flagged items; for search, pair the source with the numbers and dates written there. In the examples covered in this article, even when waiting time shortened, the matching score sometimes dropped, or an extra sentence got mixed into the translation. On the other hand, when documents were insufficient, retries took almost the same time but could still continue requesting the necessary body. By checking speed and correctness in the same trial, you can avoid being swayed by a single good record and choose the change that fits the user's work.

References

  1. Personal AI Supercomputer Powered by Blackwell | NVIDIA DGX SparkAccessed November 26, 2026
  2. Automatic Prefix Caching - vLLMAccessed November 26, 2026
  3. JSON Schema - What is a schema?Accessed November 26, 2026

Author & Supervisor

Yusuke Ishihara

Yusuke Ishihara

Started programming at age 13 with MSX. After graduating from Musashi University, worked on large-scale system development including airline core systems and Japan's first Windows server hosting/VPS infrastructure. Co-founded Site Engine Inc. in 2008. Founded Unimon Inc. in 2010 and Enison Inc. in 2025, leading development of business systems, NLP, and platform solutions. Currently focuses on product development and AI/DX initiatives leveraging generative AI and large language models (LLMs).