unslothai/unsloth · warning · RuntimeError
load error: {backend.load_progress()}
Error message
load error: {backend.load_progress()} What it means
Thrown by parseMaxOutputTokens (chat-providers-dialog.tsx:500-502) when the digit string parses to a number outside Number.isSafeInteger — i.e. beyond 2^53-1 (9007199254740991). The earlier regex already guarantees digits, so this is purely a magnitude guard against absurd token limits that would silently lose precision as floats.
Source
Thrown at scripts/perf_verify.py:80
out.mkdir(parents = True, exist_ok = True)
backend = DiffusionBackend()
token = os.environ.get("HF_TOKEN")
def load(mode_speed = None, mode_mem = None):
backend.begin_load(
args.model,
gguf_filename = args.gguf,
hf_token = token,
speed_mode = mode_speed,
memory_mode = mode_mem,
)
deadline = time.time() + 2400
while time.time() < deadline:
ph = backend.load_progress().get("phase")
if ph == "ready":
return backend.status()
if ph == "error":
raise RuntimeError(f"load error: {backend.load_progress()}")
time.sleep(0.5)
raise RuntimeError("load timed out")
def gen():
torch.cuda.synchronize()
t0 = time.time()
img = backend.generate(
prompt = args.prompt,
width = args.width,
height = args.height,
steps = args.steps,
guidance = 0.0,
seed = args.seed,
batch_size = 1,
)["images"][0]
torch.cuda.synchronize()
return img, time.time() - t0
View on GitHub (pinned to 203007d190)
Solutions
- Enter a realistic output-token cap (typically 1024–32768, any value < 9007199254740991).
- Clear the field to use the provider default.
- If you meant context length, set that in the model/context settings, not the provider Max Tokens field.
Example fix
// before 99999999999999999999 // after 32768
Defensive patterns
Strategy: validation
Validate before calling
function isSafeIntegerToken(input: string): boolean {
const t = input.trim();
return t === '' || (/^\d+$/.test(t) && Number.isSafeInteger(Number(t)));
} Prevention
- Cap the input's maxLength (e.g. 7-9 digits covers any sane token limit).
- Clamp on blur rather than rejecting absurd values outright.
- Guide users toward realistic values (1024-32768) with helper text.
When it happens
Trigger: Entering a digit string longer than ~16 characters, e.g. '99999999999999999999' or a pasted model context length like '18446744073709551615'. Number(trimmed) exceeds MAX_SAFE_INTEGER and the guard fires.
Common situations: Copy-pasting huge numbers from model spec sheets (e.g. theoretical context windows); holding a digit key; misunderstanding the field as a context-length setting.
Related errors
- Cell uses shell metacharacters / interpolation but --no-allo
- load timed out
- model load did not reach ready
- unknown family '{name}'
- Refused notebook fetch from {host!r}: not in allowlist {sort
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/8287408978aa810d.
Report an issue: GitHub.