feat(android): add on-device RAG and guard pipeline - #40
Open
Si1as-code wants to merge 1 commit into
Open
Conversation
Integrate persistent conversations, document ingestion, encrypted local storage, hybrid retrieval, HNSW indexing, checkpoint-aware generation, content and visual guards, Android UI improvements, training/evaluation tooling, tests, and the formal optimization report. The verified INT8 model object remains in the complete public release repository because GitHub public forks cannot accept contributor-owned LFS objects.
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
This contribution evolves
MiniCPM-V-demo-Androidinto an offline, office-oriented multimodal assistant with persistent conversations, editable message history, document ingestion, encrypted local knowledge bases, hybrid retrieval, HNSW indexing, and a local RAG answer guard.The branch is rebased as one commit on the current upstream
main(bbd042e) to preserve upstream changes and simplify review.Main changes
Recorded validation
The complete formal-version branch records:
These are recorded results from the formal branch. The detailed commands, artifacts, limitations, and code/test traceability are documented in the formal optimization report.
Model artifact note
The Android integration uses
model.int8.onnx(118,171,779 bytes, SHA-256d674ef4ef4fb2b4dce37d43c46eeb4b0e8038eb66da7cde1b568ca78dc45e1c2). GitHub does not permit contributors to upload new Git LFS objects to a public fork because LFS storage is owned by the upstream repository, so this PR intentionally omits that binary object.The verified object remains available in the complete public formal-version repository. The contribution branch documents how to place it under
models/rag-guard-v4-2-e5/or supply it throughRAG_GUARD_ARTIFACT_DIR. If the maintainers accept the integration, the object can be copied into upstream-owned LFS or distributed using the maintainers' preferred release channel.Review notes and limitations
Reference implementation
2a7308e811f2860217de2e31a969daf1c9bc8fe5