# Repository Briefing: SuhZhang/JeVLM
> Source: https://repoforai.com/repo/SuhZhang/JeVLM (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/SuhZhang/JeVLM
- **Official Docs / Website**: https://suhzhang.github.io/JeVLM/
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: B+ (67/100 · Maintenance 35/35 · Adoption 1/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Local AI, GPU, API
- **Momentum**: 20 ★ total (+8 24h / +20 7d) · 0 forks
- **When to Use**: Best for: GPU-equipped teams comparing adaptive reasoning with native CoT on image or frame-based video QA, using the same frozen checkpoint and a local Python evaluation workflow. Skip if: You need a turnkey network service, arbitrary VLM backbones or direct video-file ingestion, or a deployment target outside the reference environment that you cannot validate yourself.

## Overview
```text
### Architecture & Core Mechanics
JeVLM runs two inference roles on one frozen vision-language checkpoint in a single vLLM engine. Pilot decides whether to start or continue reasoning and selects visual evidence for Jet. Jet reasons or answers with the available evidence, and its evolving reasoning trace informs Pilot's next decision. Once Jet begins final answering, Pilot no longer interrupts it; generation ends at completion or the output limit.

The Python package lives under `src/` and exposes `JeVLM`, `JeVLMStar`, and the `NativeVLM` chain-of-thought baseline. Integration is through `Question` and `generate`, with `EngineConfig`, `SamplingConfig`, and `PilotConfig` for tuning. The demo reads `config.json` by default. The package pins vLLM 0.31.0, Transformers 5.17.0, and Pillow 12.3.0; the reference requirements also pin the CUDA 12.9 PyTorch build. The supplied API is an in-process Python interface, not a documented plugin system or network protocol.

### Key Capabilities & Differentiators
The three backbones are Qwen3.5-9B, Qwen3.8-27B-FP8, and Gemma 4 12B IT. Each supports all three demo variants: `native`, `jevlm_star`, and `jevlm`. Six bundled questions cover single-image geometry, multiple views, visual and functional correspondence, motion direction, and temporal understanding. The video demos provide 16 ordered RGB frames each; they do not establish support for arbitrary video-file ingestion.

Across ten equally weighted image and video benchmarks, JeVLMStar achieved the highest reported mean score on all three backbones. On Qwen3.8-27B-FP8, the means were 69.17 for native CoT, 70.74 for JeVLMStar, and 69.14 for JeVLM, while standard JeVLM reduced mean latency from 74.27 s to 58.69 s. `GenerationResult` returns the final answer, Jet's reasoning-plus-answer token count, and elapsed time including input preparation, Pilot and Jet inference, and cleanup, but excluding model loading.

### Trade-offs & Limitations
The most useful comparison is direct vLLM inference on the same backbone, represented here by `NativeVLM`. JeVLM avoids a second model or a training pipeline, but Pilot decisions still cost inference time; they pay off when the reasoning they avoid costs more. Both variants start reasoning at a threshold of 0.3 and check continuation every 1,024 reasoning tokens by default. JeVLM raises the continuation threshold from 0.3 to 0.9 to stop earlier, while JeVLMStar favors answer quality.

The benchmark averages show why the choice is workload-dependent. Gemma 4 12B's mean latency fell from 371.12 s to 42.29 s with standard JeVLM, while Qwen3.8-27B-FP8's mean score was slightly below native CoT despite the speedup. Reasoning and answering also share an output budget, so a request can return empty answer text if reasoning consumes it before final answering starts. Tune that budget alongside `engine.max_model_len` and measure empty-answer rate as well as latency. The MIT code license does not replace the checkpoint's own terms.

### Hardware & Deployment Guide
The reference setup is Python 3.11, CUDA 12.9, and one NVIDIA H100 80GB per loaded model. Package metadata accepts Python 3.11–3.12, but the pinned requirements use a Linux x86-64 vLLM wheel and `torch==2.13.0+cu129`. Install `requirements.txt` before the editable package, and treat other GPU, OS, and CUDA combinations as ports to validate. Size VRAM against the selected checkpoint, context length, and KV-cache demand at your target concurrency rather than treating the H100 reference as a minimum requirement.

Download checkpoints from Hugging Face, then pass a local checkpoint to `from_pretrained` or use `examples/demo.py --weights PATH`, with `CUDA_VISIBLE_DEVICES` to select a GPU. The demo emits JSON and accepts `--backbone`, `--case`, `--variant`, and `--config`. Use a `__main__` guard for vLLM child processes and a model context manager for cleanup. This is a local CLI and Python API deployment path; no turnkey HTTP server or container is supplied. Package metadata gives version 0.1.0, with no GitHub release listed.
```

## Key Capabilities
```text
- Shared runtime: Pilot and Jet use one frozen checkpoint in a single vLLM engine, with no additional training.
- Reasoning control: Both variants start at a threshold of 0.3 and check every 1,024 reasoning tokens; the continuation threshold is 0.9 for JeVLM versus 0.3 for JeVLMStar.
- Backbones: Qwen3.5-9B and Gemma 4 12B IT use BF16 weights and activations; Qwen3.8-27B-FP8 uses FP8 weights and BF16 activations.
- Reproducible demos: Six cases cover single images, multiple views, and video examples supplied as 16 ordered RGB frames.
- Measurement: `GenerationResult` reports the final answer, Jet output tokens, and elapsed time including Pilot inference and cleanup but excluding model loading.
- Benchmark spread: The reported mean latency speedups for JeVLM versus native CoT are 1.42×, 1.27×, and 8.78× across the three backbones.
```

## Quick Start / Clone
```bash
git clone https://github.com/SuhZhang/JeVLM.git
cd JeVLM
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e .
```
