Repository navigation
Assistant backend: Candle inference, validated tasks, documentation converter (v1.0.0) - #2
Merged
Merged
Conversation
…asks, documentation converter - backend/candle.rs: qwen2/llama GGUF on CPU, greedy decoding, repeat penalty, stop tokens, catch_unwind on bad files, generation stats - model.rs: streaming download with SHA-256 verification and progress, local install - tasks.rs + prompts/*.txt: system/schema/few-shot prompts, JSON priming, one retry, filter values validated against the report, YAML validated by the config parser - convert.rs: md/txt/yaml/json/docx/pdf -> knowledge.yaml, broken files reported - real-model smoke test (ignored by default) passes ask/filter/explain/config help - .cargo/config.toml: x86-64-v3 so Candle compiles its AVX2 kernels - README/release notes: assistant performance and CPU requirement Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9A82wxTmgsp2fMa8M4Vw1
…) before the reader tests Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9A82wxTmgsp2fMa8M4Vw1
…GitHub Release Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9A82wxTmgsp2fMa8M4Vw1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1: the inference side of the read-only copilot, which the UI, Tauri commands and CLI merged in #1 already call.
crates/assistant/src/backend/candle.rs: pure-Rust GGUF inference with Candle (qwen2 and llama families, CPU), greedy decoding so answers are reproducible, repeat penalty, stop tokens,catch_unwindso a corrupt file is an error and never a panic.model.rs: streaming download of the default model (Qwen2.5-0.5B-Instruct Q4_K_M, Apache-2.0, 0.49 GB) with SHA-256 verification and progress events; a.partfile is never left as installed. Real hashes pinned.tasks.rs+prompts/*.txt: prompts as data (system rules, JSON schema per task, few-shot examples), JSON priming, one retry with the parser error, then a plain-text fallback marked unstructured. Filter values are validated against the current report (unknown values are dropped and listed); YAML suggestions are validated by the real config parser.convert.rs: documentation →knowledge.yamlfor Markdown, text, YAML, JSON, Word (.docx) and PDF; broken files are reported, never fatal..cargo/config.toml:target-cpu=x86-64-v3on x86-64 targets so Candle compiles its AVX2/FMA kernels (3–4× faster inference). Documented in the README requirements.manual_range_contains,large_enum_variant), RAM figure corrected, release notes updated.Real-model results (ignored test, run locally with the downloaded model)
severity: [ERROR], storey: Level 1, ifc_type: IfcWall, dropped: []required_psetsYAML, identical on re-runLoad 1.5 s, prompt 33–38 tok/s, generation 12–15 tok/s on a 4-core CPU; about 30–50 s per question, 1.0 GB resident.
Test plan
cargo fmt --all -- --checkcleancargo clippy --workspace --all-targets -- -D warningscleancargo test --workspace: 168 passed, 0 failed, 2 ignored (real-model smoke test and demo writer, both opt-in)cargo test -p verimodel-assistant --release --test real_model -- --ignored)Generated by Claude Code