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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("thomasjvu/lisper-gemma4-e2b-audio-full") model = AutoModelForMultimodalLM.from_pretrained("thomasjvu/lisper-gemma4-e2b-audio-full", device_map="auto") 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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 Desktop
- 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
Finalize Lisper E2B full model card
Browse files
README.md
CHANGED
|
@@ -7,32 +7,49 @@ tags:
|
|
| 7 |
- audio
|
| 8 |
- merged
|
| 9 |
- unsloth
|
|
|
|
| 10 |
- lisper
|
| 11 |
---
|
| 12 |
|
| 13 |
# Lisper Gemma 4 E2B Audio Full Checkpoint
|
| 14 |
|
| 15 |
-
This is the
|
| 16 |
|
| 17 |
-
##
|
| 18 |
|
| 19 |
-
-
|
| 20 |
-
-
|
|
|
|
| 21 |
- Weight file: `model.safetensors`
|
| 22 |
-
-
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
| 29 |
-
- Training steps: `4000`
|
| 30 |
-
- Selected checkpoint: `checkpoint-2500`
|
| 31 |
-
- Final training loss: `0.7217483117580413`
|
| 32 |
-
- Best validation metric: `4.851842880249023`
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
- audio
|
| 8 |
- merged
|
| 9 |
- unsloth
|
| 10 |
+
- speech
|
| 11 |
- lisper
|
| 12 |
---
|
| 13 |
|
| 14 |
# Lisper Gemma 4 E2B Audio Full Checkpoint
|
| 15 |
|
| 16 |
+
This is the merged Lisper checkpoint: `google/gemma-4-E2B-it` with the trained Lisper LoRA adapter folded into a standalone `safetensors` model.
|
| 17 |
|
| 18 |
+
## Model Lineage
|
| 19 |
|
| 20 |
+
- Base model: `google/gemma-4-E2B-it`
|
| 21 |
+
- Training: Unsloth supervised fine-tuning with QLoRA / LoRA
|
| 22 |
+
- Merge method: base + LoRA adapter merged into a 16-bit checkpoint
|
| 23 |
- Weight file: `model.safetensors`
|
| 24 |
+
- Training rows: `16,000`
|
| 25 |
+
- Validation rows: `2,000`
|
| 26 |
+
- Held-out test rows: `2,000`
|
| 27 |
|
| 28 |
+
This is not a dense full-parameter fine-tune. It is a merged base+LoRA checkpoint for easier deployment.
|
| 29 |
|
| 30 |
+
## Evaluation
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
+
The release-quality evaluation is the v18 hybrid acoustic+Gemma path:
|
| 33 |
|
| 34 |
+
- Held-out rows: `2,000`
|
| 35 |
+
- Hard errors: `0`
|
| 36 |
+
- Verdict: `pass`
|
| 37 |
+
- Class match: `0.976`
|
| 38 |
+
- Clear/non-clear match: `0.989`
|
| 39 |
+
- Exact four-line format: `1.0`
|
| 40 |
+
- Reason/cue/encouragement present: `1.0`
|
| 41 |
|
| 42 |
+
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.
|
| 43 |
+
|
| 44 |
+
## Deployment
|
| 45 |
+
|
| 46 |
+
- Browser/WebGPU demo: `thomasjvu/lisper-gemma4-e2b-audio-onnx-q4f16`
|
| 47 |
+
- Server-side ZeroGPU fallback: `thomasjvu/lisper-zerogpu`
|
| 48 |
+
- Adapter-only package: `thomasjvu/lisper-gemma4-e2b-audio-lora`
|
| 49 |
+
|
| 50 |
+
Use the q4f16 ONNX/WebGPU package for browser demos. Use this merged checkpoint as the server-side correctness reference.
|
| 51 |
+
|
| 52 |
+
## Limitations
|
| 53 |
+
|
| 54 |
+
- The lisp dataset is synthetically generated from speaker-disjoint source speech.
|
| 55 |
+
- This is a practice assistant, not a medical diagnosis tool or a replacement for a speech-language pathologist.
|