Commit Graph
5 Commits
Author SHA1 Message Date
guofangandClaude Sonnet 5.5 2f59bddba0 Show readable tokens for byte-level BPE tokenizers
Qwen tokens were printed as raw byte characters (e.g. 你好 as ä½łå¥½).
Decode each token for byte-level tokenizers, keeping the raw form for
tokens that hold only part of a multi-byte character.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 22:19:56 +08:00
guofangandClaude Sonnet 5.5 0cb17d6638 Add Qwen3-Embedding-8B and last-token pooling
Qwen3-Embedding is a decoder model: it pools the last token, so add a
"last" pooling mode, pad on the left, and load the weights in bfloat16.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 22:16:50 +08:00
guofangandClaude Sonnet 5.5 30d7be1a80 Use the Apple Silicon GPU when available
Pick cuda, then mps, then cpu.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 22:16:50 +08:00
guofangandClaude Sonnet 5.5 822b55f26f Complete while typing with prompt_toolkit
Replace readline with a prompt_toolkit session: the completion menu opens
as you type, history suggestions show in gray (accept with Right), and
history lives in .cache/history. Enter on a highlighted candidate accepts
it instead of submitting the line. Ctrl+C now exits cleanly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 22:16:50 +08:00
GuofangandClaude Sonnet 5.5 b0a961056f Initial commit
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 11:07:18 +08:00