Termux-Vision Logo

Termux-Vision

v1.0.0
Foundation
pip / npm
Sponsor GitHub Founder CV

Advanced Parameters & Boundary Security

Hyperparameter reference, boundary guards, and device isolation protocols

1. Advanced VLM Inference Hyperparameters

Parameter Type / Range Default Description & Behavior
prompt str (Non-empty) Default Korean prompt User prompt query. Empty/whitespace raises ValueError.
max_tokens int > 0 150 Maximum token generation budget. Values ≤ 0 are rejected.
temperature float ≥ 0.0 0.2 Sampling temperature. Lower values produce deterministic outputs.
top_p 0.0 < p ≤ 1.0 None Nucleus sampling probability threshold.
top_k int ≥ 1 None Top-k sampling threshold.
repeat_penalty float ≥ 0.0 1.2 Penalty applied to repeated token logits.
seed int None Explicit RNG seed for reproducible generation.
system_prompt str None System persona and behavioral steering prompt.
ngl int ≥ 0 99 (Vulkan) / 0 (CPU) Number of neural layers offloaded to Vulkan GPU.

2. Strict Null / Zero Boundary Validation (Zero Silent Fallbacks)

Termux-Vision adheres to a strict Fail-Closed Validation Protocol. If invalid, null, or empty parameters are provided, the engine will never silently execute dangerous dummy fallbacks; it immediately raises explicit structured exceptions:

3. Device Backend Execution Policy

# Auto Mode (Recommended for Android):
# Attempts Vulkan GPU -> Gracefully retries CPU on driver errors with warning
termux-vision vlm photo.jpg --device auto

# Strict GPU Mode:
# Enforces Vulkan GPU. Fails immediately without silent CPU fallback if GPU unavailable
termux-vision vlm photo.jpg --device gpu

# Dedicated CPU Mode:
termux-vision vlm photo.jpg --device cpu --threads 4