You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(qwen4_exp): image input (vision tower + mRoPE) for Qwen3.8-Flash-Next
Serve images through the OpenAI chat endpoint. Opt-in with FREETOKEN_LOAD_VISION=1.
Model side: the HF Qwen4ExpVisionModel runs inside a BaseOP whose tensors load as
``visual.*`` with the dense weights (meta build, assign-on-load, rotary buffer rebuilt
on the device), so the expert-cache planner counts them and --dummy-weight works.
Soft tokens replace the image placeholders before the hyper-connection repeat.
mRoPE: ``mrope.py`` ports HF get_rope_index (3-D T/H/W positions, decode delta) and
the interleaved cos|sin rows. A prefill batch with image tokens gets a per-token
cos|sin table that the existing rope kernels index by row (attention and the QSA
indexer); decode reads the normal cache at position + delta. The table carries
index_ratio - 1 lead rows per request so a straddling indexer group can be roped at
its first token. Text-only batches alias positions and run the same kernels as before.
Request path: image_url parts (inline data: URLs only, 16 MiB cap) are decoded in the
API server; the tokenizer worker runs the checkpoint's image processor
(FREETOKEN_IMAGE_MAX_PIXELS, default 1280*28*28) and expands each <|image_pad|>; the
scheduler encodes the images on every TP rank and computes the rope positions before
admission. Image prompts must fit one prefill chunk (rejected with an error otherwise).
The wire encoder now carries N-D tensors.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0173pf9k9fSVtwbm3f898HDt
"""Attach the PLE n-gram table (pinned checkpoint bank, or zeros for dummy weights); returns the pinned host bytes the engine reserves from its pin budget."""
0 commit comments