mirror of
https://github.com/FlashML-org/FreeToken.git
synced 2026-11-21 01:52:30 +08:00
* feat(gguf): load the vision tower from a llama.cpp mmproj Qwen3.5 / Qwen3.6 / Qwen3.8 (qwen3vl_merger) and Gemma-4 26B-A4B / 31B (gemma4v) / 12B (gemma4uv) take image input from a separate mmproj file: --mmproj, else one in the model's own folder. The tower runs in bf16 (quantized mmproj files are dequantized) and its config comes from the GGUF metadata plus per-arch defaults. * docs(gguf): describe mmproj image input without a model list * test(gguf): drop the mmproj tests * fix(gguf): escape the model folder when globbing for mmproj files * fix(gguf): skip auto-discovered mmproj files the text model cannot use * fix(gguf): serve text from a GGUF that carries vision tensors itself
33 lines
966 B
Python
33 lines
966 B
Python
from .attention import Gemma4Attention
|
|
from .config import parse_config
|
|
from .gguf import gguf_mm_config, iter_gguf_weights, parse_gguf_config, to_gguf
|
|
from .model import Gemma4ForCausalLM, Gemma4ForConditionalGeneration, Gemma4UnifiedForConditionalGeneration
|
|
from .moe import Gemma4Router
|
|
from .vision import Gemma4MultimodalEmbedder, Gemma4UnifiedVisionEmbedder, Gemma4VisionModel
|
|
from .weight import (
|
|
nvfp4_expert_spec,
|
|
iter_vision_weights,
|
|
iter_weights,
|
|
iter_weights_parallel,
|
|
)
|
|
|
|
__all__ = [
|
|
"nvfp4_expert_spec",
|
|
"Gemma4Attention",
|
|
"Gemma4ForCausalLM",
|
|
"Gemma4ForConditionalGeneration",
|
|
"Gemma4MultimodalEmbedder",
|
|
"Gemma4UnifiedForConditionalGeneration",
|
|
"Gemma4UnifiedVisionEmbedder",
|
|
"Gemma4Router",
|
|
"Gemma4VisionModel",
|
|
"parse_config",
|
|
"iter_vision_weights",
|
|
"iter_weights",
|
|
"iter_weights_parallel",
|
|
"gguf_mm_config",
|
|
"parse_gguf_config",
|
|
"iter_gguf_weights",
|
|
"to_gguf",
|
|
]
|