Wire receipt OCR to cf-docuvision managed service #10
Labels
No labels
backlog
beta-feedback
bug
duplicate
enhancement
help wanted
invalid
needs-design
needs-triage
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/kiwi#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Kiwi currently loads
Qwen2.5-VL-7B-Instructin-process insideapp/services/ocr/vl_model.py. This monopolizes VRAM for the duration the process is alive and cannot be shared with other CF products on the same GPU.cf-orchalready has acf-docuvisionservice slot in all GPU profiles (6gb/8gb/16gb/24gb), backed by ByteDance/Dolphin-v2 (Qwen2.5-VL-3B, purpose-built document parser). Oncecf-docuvisionis implemented as a managed HTTP service, Kiwi should call it via HTTP rather than loading the model itself.Tasks
cf-docuvisionHTTP service incircuitforge-core(tracked in circuitforge-core)DOCUVISION_URLconfig key toapp/core/config.py(defaulthttp://localhost:<cf-docuvision-port>/extract)app/services/ocr/docuvision_client.py— thin HTTP client matching the sameextract_receipt_data()interface asVisionLanguageOCRReceiptServiceselect backend based on config: ifDOCUVISION_URLis set and reachable, use HTTP client; else fall back to in-processVisionLanguageOCRInterim state
Model upgraded from
Qwen2-VL-2B-Instruct→Qwen2.5-VL-7B-Instructinvl_model.py:43— same API, better model, no pipeline changes. This runs until cf-docuvision HTTP service is live.Related
Closing — DocuvisionClient added with fast-path OCR in
app/api/endpoints/ocr.py. Receipt upload triggers cf-docuvision when available, falls back to local pipeline. Shipped in commit7aebe96.