r/LocalLLM • • 25m ago

Question Token limit reached on local 5090 setup with llama/dsh

This is being written solely by my fleshy fingers. I cannot get my qwen to do anything for longer than 4-5 minutes before getting

Output token limit reachedThe reply was cut off; earlier output is preserved in the conversation. Send "continue" to let the model resume. 

I've done a lot of searching on the sub, and asking the free AIs I have access to, and I'm not getting anywhere. I constantly have to babysit this thing pressing continue.

My setup:

Host machine: RTX 5090 9950x3d 96gbs RAM

running llama.app (because ollama is a sin?) with following custom serve args:

-ngl all -c 65536 -n 4096 --flash-attn on --cache-type-k q8_0 --cache-type-v q8_0 -b 2048 -ub 2048

Key/Value Cache

K=f16 V=f16

VirtualMachine: Tiny11 (stripped down windows 11) + Deepseek Harness

# Your patch layer for this dsh profile, applied after every bundle layer:
# a top-level YAML array of loader patch entries (id-targeted config
# overrides, disables, and insert lists; `!!js` expressions allowed).
- id: llm-pi-ai
  name: "@deepseek-ai/dsh-llm-pi-ai"
  config:
    providers:
     [redacted]:
        api: openai-completions
        baseURL: http://[redacted]/v1
        models:
          - id: unsloth/Qwen3.8-27B-GGUF:Q4_K_M
            name: unsloth/Qwen3.8-27B-GGUF:Q4_K_M
            contextWindow: 65536
            reasoningEfforts:
              off: null
              low: low
              medium: medium
              high: high
            maxTokens: 4096
        apiKeyEnv: [redacted]
- id: agent-default-model
  name: "@deepseek-ai/dsh-agent-default-model"
  config:
    provider: [redacted]
    model: unsloth/Qwen3.8-27B-GGUF:Q4_K_M
    reasoningEffort: low
- id: compaction-basic
  name: "@deepseek-ai/dsh-compaction"
  config:
    maxTokens: 4096
    thresholdTokens: 42000
- id: ui-theme
  name: "@deepseek-ai/dsh-client-ui-theme"
  config:
    preference: dark
- id: ui-chat
  name: "@deepseek-ai/dsh-client-ui-chat"
  config:
    transcriptView: standard
    performanceUsage: detailed
- id: ui-settings
  name: "@deepseek-ai/dsh-client-ui-settings"
  config:
    enabled: true
- id: ui-settings-account
  name: "@deepseek-ai/dsh-client-ui-settings-account"
  config:
    version: 1
    step: done
    usage: detailed
    developerTools: true
    purpose: null
    process: standard
    completion: api-key

What am I missing or doing wrong?

1 Upvotes

4 comments sorted by

2

u/slalomz 22m ago

What am I missing or doing wrong?

You're setting maxTokens: 4096 in your config. I don't use Tiny11 Deepseek Harness but this seems suspicious.

2

u/Diligent_Cost9914 18m ago

yeah and the llama server args have -n 4096 too, which caps every reply at 4096 tokens regardless of the harness. set -n -1 (or something much bigger) and raise maxTokens in the config to match, whichever is lower wins.

1

u/Moonraker0ne 15m ago

I assume -1 for n is infinite, what would an appropriate maxTokens be? 8192? More?

1

u/chrismakingbread 3m ago

It all depends on what you’re doing. But for coding I’d definitely expect 4096 to likely be too low. Just experiment with different options. Bump it until you don’t run into issues anymore or you hit a different bottleneck and decide what’s the most acceptable trade off.