Skip to content

fix: temp model fallback to Qwen2.5-Coder-3B (qwen35 candle TODO) - #873

Merged
joelteply merged 1 commit into
mainfrom
fix/working-model-fallback
Apr 13, 2026
Merged

joelteply merged 1 commit into
mainfrom
fix/working-model-fallback

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Qwen3.5 GGUF can't load in candle (hybrid arch). Swap to Qwen2.5-Coder-3B so AIs work. #163 tracks the real fix.

… added

The Qwen3.5 GGUF (qwen35 architecture) can't be loaded by candle yet —
hybrid DeltaNet+attention architecture needs a new loader. Swap to
Qwen2.5-Coder-3B-Instruct which works with candle today so users can
actually chat with AIs in Docker.

TODO(#163): Add qwen35 architecture support to the candle GGUF loader,
then switch back to continuum-ai/qwen3.5-4b-code-forged-GGUF.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@joelteply
joelteply merged commit 240bc37 into main Apr 13, 2026
Copilot AI review requested due to automatic review settings April 13, 2026 02:16
@joelteply
joelteply deleted the fix/working-model-fallback branch April 13, 2026 02:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Candle quantized-model auto-selection to temporarily use a known-working Qwen2.5 GGUF model because Qwen3.5 GGUF currently can’t be loaded by candle due to its hybrid architecture.

Changes:

  • Switch default quantized model selection from the forged Qwen3.5 4B GGUFs to Qwen/Qwen2.5-Coder-3B-Instruct-GGUF (Q8_0 for 32GB+ RAM, otherwise Q4_K_M).
  • Add inline rationale and a TODO to switch back once candle supports the qwen35 hybrid architecture.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +154 to +156
// TODO(#163): Switch to continuum-ai/qwen3.5-4b-code-forged-GGUF once the
// Rust candle engine supports the qwen35 hybrid architecture (DeltaNet +
// full attention). The 3.5 GGUF exists on HF but candle can't load it yet.

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TODO points to #163, but in this repo PR #163 is an eslint bump (unrelated to candle/Qwen hybrid-arch support). Please update the TODO reference to the correct issue/PR that tracks adding qwen35 hybrid architecture support, so this doesn’t become a dead link.

Copilot uses AI. Check for mistakes.
log.info(&format!("System RAM: {}GB — selecting best model", total_ram_gb));

// Model selection: our forged Qwen3.5 models
// Model selection: Qwen2.5-Coder-3B-Instruct (known working with candle).

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function-level doc comment above this block still describes the old Qwen3.5 device ladder and sizes, but the implementation now selects Qwen2.5-Coder-3B. Please update the doc comment to match the new default/fallback behavior to avoid misleading operators/users.

Suggested change
// Model selection: Qwen2.5-Coder-3B-Instruct (known working with candle).
// Model selection currently defaults to Qwen2.5-Coder-3B-Instruct because it
// is known to work with candle. On 32GB+ systems we prefer the higher-quality
// Q8_0 GGUF; otherwise we fall back to the smaller universal Q4_K_M GGUF.

Copilot uses AI. Check for mistakes.
// full attention). The 3.5 GGUF exists on HF but candle can't load it yet.
let (repo, filename, tokenizer_repo) = if total_ram_gb >= 32 {
log.info("Selected: qwen3.5-4b-code-forged Q8_0 (high quality, 32GB+ device)");
log.info("Selected: Qwen2.5-Coder-3B-Instruct Q8_0 (high quality, 32GB+ device)");

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This selection is based on total_ram_gb (system RAM), but the log line says "32GB+ device" which reads like GPU/VRAM. Consider changing the message to explicitly reference system RAM (e.g., "32GB+ RAM") to avoid confusion when debugging model selection.

Suggested change
log.info("Selected: Qwen2.5-Coder-3B-Instruct Q8_0 (high quality, 32GB+ device)");
log.info("Selected: Qwen2.5-Coder-3B-Instruct Q8_0 (high quality, 32GB+ RAM)");

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Apr 13, 2026
PR #878 added the qwen35 hybrid DeltaNet+Attention candle backend.
Reverting the Qwen2.5 fallback from PR #873 — our forged models run natively now.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Apr 13, 2026
…#880)

PR #878 added the qwen35 hybrid DeltaNet+Attention candle backend.
Reverting the Qwen2.5 fallback from PR #873 — our forged models run natively now.

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants