mirror of
https://github.com/p-e-w/heretic.git
synced 2026-12-03 18:42:57 +07:00
[PR #22] [CLOSED] Added: Notebook compatibility, Multimodal support (InternVL/QwenVL/Gemma), and trust_remote_code #241
Labels
No labels
bug
enhancement
enhancement
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
p-e-w/heretic#241
Loading…
Add table
Add a link
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?
📋 Pull Request Information
Original PR: https://github.com/p-e-w/heretic/pull/22
Author: @Vinay-Umrethe
Created: 11/19/2025
Status: ❌ Closed
Base:
master← Head:master📝 Commits (10+)
b48bc29feat: Notebook compatibility, Multimodal support (InternVL/Qwen/Omni/VL), and trust_remote_codeb3bb83ffix: Applied upstream fixes (multi-GPU support, memory optimization, KeyError fix) TO THE ENHANCED EDITIONb54e726fix: Restore accidentally deleted MPS support and GPU fallback logic43a1c25fix: Complete upstream sync (restore missing import gc and PYTORCH_CUDA_ALLOC_CONF)e568901chore: Revert metadata changes (name, version, readme) to match upstream955e6cbUpdated README8d8727fMerge branch 'master' into masterc73689bfix: Resolve CI failures (formatting, missing imports, package name)1abcf8eMerge branch 'master' of https://github.com/Vinayyyy7/heretic1d47b35style: Fix formatting in utils.py to pass CI📊 Changes
6 files changed (+241 additions, -34 deletions)
View changed files
📝
pyproject.toml(+1 -1)📝
src/heretic/config.py(+1 -0)📝
src/heretic/main.py(+16 -15)📝
src/heretic/model.py(+115 -17)📝
src/heretic/utils.py(+107 -0)📝
uv.lock(+1 -1)📄 Description
This PR significantly enhances Heretic's compatibility with notebook environments (Colab/Kaggle) and extends support to modern multimodal models.
Key Changes
Notebook Compatibility:
questionaryarrow-key menus with robust numeric input loops. This fixes "CPR" warnings and usability issues in non-TUI environments like Google Colab./exitcommand to the chat loop for graceful termination. Returing to the menu.Multimodal Model Support:
model.py.Qwen/Qwen2.5-VL-7B-Instruct,Qwen/Qwen2.5-VL-3B-InstructQwen/Qwen3-VL-4B-Instruct,Qwen/Qwen3-VL-2B-InstructQwen/Qwen3-VL-235B-A22B-Instruct,Qwen/Qwen3-VL-30B-A3B-InstructQwen/Qwen2.5-Omni-7B,Qwen/Qwen2.5-Omni-3BQwen/Qwen3-Omni-30B-A3B-Instruct,Qwen/Qwen3-Omni-30B-A3B-ThinkingOpenGVLab/InternVL3_5-8B-HF,OpenGVLab/InternVL3_5-2B-HFgoogle/gemma-3-4b-it,google/gemma-3n-4b-itget_layers()to handle nested structures in VL models.Custom Code Support:
--trust-remote-codeflag (default:False) to allow loading models with custom modeling code (required for InternVL, etc.).Robustness:
bfloat16to the default dtype list.pixel_values=Noneor dummy tensors to handle picky VL models that crash on text-only inputs.Upstream Sync:
KeyError.(Nov 19, 2025, 5:32 AM GMT+5:30)just 1-2 hours after I enhanced it. DONE ✅Tested successfully on Google Colab with
OpenGVLab/InternVL3_5-2B-HF,Qwen/Qwen2.5-Omni-3B,Qwen3-VL-2B-InsturctandQwen/Qwen2.5-VL-3B-Instruct.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.