Image-Text-to-Text
Transformers
Safetensors
gemma4
gemma-4
audio
merged
unsloth
speech
lisper
conversational
Instructions to use thomasjvu/lisper-gemma4-e2b-audio-full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thomasjvu/lisper-gemma4-e2b-audio-full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="thomasjvu/lisper-gemma4-e2b-audio-full") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("thomasjvu/lisper-gemma4-e2b-audio-full") model = AutoModelForImageTextToText.from_pretrained("thomasjvu/lisper-gemma4-e2b-audio-full") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use thomasjvu/lisper-gemma4-e2b-audio-full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thomasjvu/lisper-gemma4-e2b-audio-full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thomasjvu/lisper-gemma4-e2b-audio-full", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/thomasjvu/lisper-gemma4-e2b-audio-full
- SGLang
How to use thomasjvu/lisper-gemma4-e2b-audio-full with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "thomasjvu/lisper-gemma4-e2b-audio-full" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thomasjvu/lisper-gemma4-e2b-audio-full", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "thomasjvu/lisper-gemma4-e2b-audio-full" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thomasjvu/lisper-gemma4-e2b-audio-full", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Unsloth Studio
How to use thomasjvu/lisper-gemma4-e2b-audio-full with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thomasjvu/lisper-gemma4-e2b-audio-full to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thomasjvu/lisper-gemma4-e2b-audio-full to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for thomasjvu/lisper-gemma4-e2b-audio-full to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="thomasjvu/lisper-gemma4-e2b-audio-full", max_seq_length=2048, ) - Docker Model Runner
How to use thomasjvu/lisper-gemma4-e2b-audio-full with Docker Model Runner:
docker model run hf.co/thomasjvu/lisper-gemma4-e2b-audio-full
| library_name: transformers | |
| base_model: google/gemma-4-E2B-it | |
| license: gemma | |
| tags: | |
| - gemma-4 | |
| - audio | |
| - merged | |
| - unsloth | |
| - speech | |
| - lisper | |
| # Lisper Gemma 4 E2B Audio Full Checkpoint | |
| This is the merged Lisper checkpoint: `google/gemma-4-E2B-it` with the trained Lisper LoRA adapter folded into a standalone `safetensors` model. | |
| ## Model Lineage | |
| - Base model: `google/gemma-4-E2B-it` | |
| - Training: Unsloth supervised fine-tuning with QLoRA / LoRA | |
| - Merge method: base + LoRA adapter merged into a 16-bit checkpoint | |
| - Weight file: `model.safetensors` | |
| - Training rows: `16,000` | |
| - Validation rows: `2,000` | |
| - Held-out test rows: `2,000` | |
| This is not a dense full-parameter fine-tune. It is a merged base+LoRA checkpoint for easier deployment. | |
| ## Evaluation | |
| The release-quality evaluation is the v18 hybrid acoustic+Gemma path: | |
| - Held-out rows: `2,000` | |
| - Hard errors: `0` | |
| - Verdict: `pass` | |
| - Class match: `0.976` | |
| - Clear/non-clear match: `0.989` | |
| - Exact four-line format: `1.0` | |
| - Reason/cue/encouragement present: `1.0` | |
| The evaluated pipeline uses acoustic features for the lisp-class hint and Gemma for structured coaching text and tone. Do not interpret these metrics as a pure direct-Gemma raw-audio classification result. | |
| ## Deployment | |
| - Browser/WebGPU demo: `thomasjvu/lisper-gemma4-e2b-audio-onnx-q4f16` | |
| - Server-side ZeroGPU fallback: `thomasjvu/lisper-zerogpu` | |
| - Adapter-only package: `thomasjvu/lisper-gemma4-e2b-audio-lora` | |
| Use the q4f16 ONNX/WebGPU package for browser demos. Use this merged checkpoint as the server-side correctness reference. | |
| ## Limitations | |
| - The lisp dataset is synthetically generated from speaker-disjoint source speech. | |
| - This is a practice assistant, not a medical diagnosis tool or a replacement for a speech-language pathologist. | |