Image-Text-to-Text
Safetensors
English
vllm
gemma4
gemma
pearl
quantized
multimodal
vision
text-generation
mining
conversational
8-bit precision
Instructions to use pearl-ai/Gemma-4-31B-it-pearl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Inference
- Notebooks
- Google Colab
- Kaggle
Enable multimodal (vision): add processor_config.json and update model card
Browse files- README.md +21 -18
- processor_config.json +75 -0
README.md
CHANGED
|
@@ -3,12 +3,16 @@ language:
|
|
| 3 |
- en
|
| 4 |
license: gemma
|
| 5 |
library_name: vllm
|
| 6 |
-
pipeline_tag: text-
|
|
|
|
|
|
|
| 7 |
tags:
|
| 8 |
- gemma
|
| 9 |
- gemma4
|
| 10 |
- pearl
|
| 11 |
- quantized
|
|
|
|
|
|
|
| 12 |
- text-generation
|
| 13 |
- mining
|
| 14 |
---
|
|
@@ -23,16 +27,18 @@ Pearl **Gemma 4** instruction-tuned checkpoint for **Pearl** inference and minin
|
|
| 23 |
|
| 24 |
## Benchmarks
|
| 25 |
|
| 26 |
-
Results from our evaluation runs. **Original** is
|
| 27 |
|
| 28 |
-
| Model | GPQA | MMLU | HumanEval (pass@1) | MGSM3 |
|
| 29 |
-
| --- | --- | --- | --- | --- |
|
| 30 |
-
| Original | 77.27% | 90.93% | 94.70% | 88.62% |
|
| 31 |
-
| Pearl | 77.37% | 90.56% | 94.15% | 89.09% |
|
|
|
|
|
|
|
| 32 |
|
| 33 |
## Pearl mining (vLLM plugin)
|
| 34 |
|
| 35 |
-
**Pearl mining** means serving through the Pearl **miner stack**: a `pearld` node (RPC), `pearl-gateway`, and the **vLLM miner** build that loads the Pearl plugin (NoisyGEMM / gateway integration).
|
| 36 |
|
| 37 |
Typical flow:
|
| 38 |
|
|
@@ -40,15 +46,15 @@ Typical flow:
|
|
| 40 |
2. Start the **Pearl miner / vLLM** image or workspace (plugin-enabled vLLM).
|
| 41 |
3. Point the server at this model; gateway + miner components handle **mining-side** integration.
|
| 42 |
|
| 43 |
-
High-level prerequisites
|
| 44 |
|
| 45 |
-
- Python 3.12, **`uv`**, CUDA + NVIDIA GPU (see miner docs for supported architectures
|
| 46 |
- Rust toolchain (for Pearl miner build paths)
|
| 47 |
- A running **`pearld`** with RPC credentials for the gateway
|
| 48 |
|
| 49 |
### Docker (recommended for mining)
|
| 50 |
|
| 51 |
-
From the **Pearl** repository root
|
| 52 |
|
| 53 |
```bash
|
| 54 |
docker buildx build -t vllm_miner . -f miner/vllm-miner/Dockerfile
|
|
@@ -67,12 +73,9 @@ docker run --rm -it --gpus all \
|
|
| 67 |
--host 0.0.0.0 --port 8000 \
|
| 68 |
--max-model-len 8192 \
|
| 69 |
--gpu-memory-utilization 0.9 \
|
| 70 |
-
--enforce-eager
|
| 71 |
-
--language-model-only
|
| 72 |
```
|
| 73 |
|
| 74 |
-
For **inference-only** (no mining), or when you have the plugin installed in your own `uv` environment, you can use plain vLLM as below.
|
| 75 |
-
|
| 76 |
## Inference with vLLM
|
| 77 |
|
| 78 |
Serve from the Hugging Face Hub id (or from a local directory containing this snapshot):
|
|
@@ -83,21 +86,21 @@ uv run vllm serve pearl-ai/Gemma-4-31B-it-pearl \
|
|
| 83 |
--port 8000 \
|
| 84 |
--max-model-len 8192 \
|
| 85 |
--gpu-memory-utilization 0.9 \
|
| 86 |
-
--enforce-eager
|
| 87 |
-
--language-model-only
|
| 88 |
```
|
| 89 |
|
| 90 |
**Flags (same as above, one line):**
|
| 91 |
|
| 92 |
```bash
|
| 93 |
-
uv run vllm serve pearl-ai/Gemma-4-31B-it-pearl --host 0.0.0.0 --port 8000 --max-model-len 8192 --gpu-memory-utilization 0.9 --enforce-eager
|
| 94 |
```
|
| 95 |
|
| 96 |
-
|
| 97 |
|
| 98 |
## Model details
|
| 99 |
|
| 100 |
- **Architecture:** `Gemma4ForConditionalGeneration` (`model_type`: `gemma4`)
|
|
|
|
| 101 |
|
| 102 |
## License
|
| 103 |
|
|
|
|
| 3 |
- en
|
| 4 |
license: gemma
|
| 5 |
library_name: vllm
|
| 6 |
+
pipeline_tag: image-text-to-text
|
| 7 |
+
base_model:
|
| 8 |
+
- google/gemma-4-31B-it
|
| 9 |
tags:
|
| 10 |
- gemma
|
| 11 |
- gemma4
|
| 12 |
- pearl
|
| 13 |
- quantized
|
| 14 |
+
- multimodal
|
| 15 |
+
- vision
|
| 16 |
- text-generation
|
| 17 |
- mining
|
| 18 |
---
|
|
|
|
| 27 |
|
| 28 |
## Benchmarks
|
| 29 |
|
| 30 |
+
Results from our evaluation runs (lmms-eval + vLLM, full test sets). **Original** is `google/gemma-4-31B-it`; **Pearl** is this checkpoint.
|
| 31 |
|
| 32 |
+
| Model | GPQA | MMLU | HumanEval (pass@1) | MGSM3 | MMMU-Pro Vision* |
|
| 33 |
+
| --- | --- | --- | --- | --- | --- |
|
| 34 |
+
| Original | 77.27% | 90.93% | 94.70% | 88.62% | 54.57% |
|
| 35 |
+
| Pearl | 77.37% | 90.56% | 94.15% | 89.09% | 54.45% |
|
| 36 |
+
|
| 37 |
+
\* **MMMU-Pro Vision (Pearl / Original):** lmms-eval `mmmu_pro_vision`, direct-answer prompting, `max_new_tokens=256`, full test set (1730 samples). Google reports **76.9%** on MMMU Pro in the [Gemma 4 model card](https://ai.google.dev/gemma/docs/core/model_card_4); they do not publish the eval recipe for that figure (prompting, subset, or aggregation).
|
| 38 |
|
| 39 |
## Pearl mining (vLLM plugin)
|
| 40 |
|
| 41 |
+
**Pearl mining** means serving through the Pearl **miner stack**: a `pearld` node (RPC), `pearl-gateway`, and the **vLLM miner** build that loads the Pearl plugin (NoisyGEMM / gateway integration). Details are in the [miner README](https://github.com/pearl-research-labs/pearl/tree/master/miner).
|
| 42 |
|
| 43 |
Typical flow:
|
| 44 |
|
|
|
|
| 46 |
2. Start the **Pearl miner / vLLM** image or workspace (plugin-enabled vLLM).
|
| 47 |
3. Point the server at this model; gateway + miner components handle **mining-side** integration.
|
| 48 |
|
| 49 |
+
High-level prerequisites:
|
| 50 |
|
| 51 |
+
- Python 3.12, **`uv`**, CUDA + NVIDIA GPU (see miner docs for supported architectures)
|
| 52 |
- Rust toolchain (for Pearl miner build paths)
|
| 53 |
- A running **`pearld`** with RPC credentials for the gateway
|
| 54 |
|
| 55 |
### Docker (recommended for mining)
|
| 56 |
|
| 57 |
+
From the **Pearl** repository root:
|
| 58 |
|
| 59 |
```bash
|
| 60 |
docker buildx build -t vllm_miner . -f miner/vllm-miner/Dockerfile
|
|
|
|
| 73 |
--host 0.0.0.0 --port 8000 \
|
| 74 |
--max-model-len 8192 \
|
| 75 |
--gpu-memory-utilization 0.9 \
|
| 76 |
+
--enforce-eager
|
|
|
|
| 77 |
```
|
| 78 |
|
|
|
|
|
|
|
| 79 |
## Inference with vLLM
|
| 80 |
|
| 81 |
Serve from the Hugging Face Hub id (or from a local directory containing this snapshot):
|
|
|
|
| 86 |
--port 8000 \
|
| 87 |
--max-model-len 8192 \
|
| 88 |
--gpu-memory-utilization 0.9 \
|
| 89 |
+
--enforce-eager
|
|
|
|
| 90 |
```
|
| 91 |
|
| 92 |
**Flags (same as above, one line):**
|
| 93 |
|
| 94 |
```bash
|
| 95 |
+
uv run vllm serve pearl-ai/Gemma-4-31B-it-pearl --host 0.0.0.0 --port 8000 --max-model-len 8192 --gpu-memory-utilization 0.9 --enforce-eager
|
| 96 |
```
|
| 97 |
|
| 98 |
+
These commands load the full model (text + vision). Append `--language-model-only` if you only need text — it disables the vision tower and uses less GPU memory.
|
| 99 |
|
| 100 |
## Model details
|
| 101 |
|
| 102 |
- **Architecture:** `Gemma4ForConditionalGeneration` (`model_type`: `gemma4`)
|
| 103 |
+
- **Modalities:** Text, Image
|
| 104 |
|
| 105 |
## License
|
| 106 |
|
processor_config.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_ms_per_token": 40,
|
| 3 |
+
"audio_seq_length": 750,
|
| 4 |
+
"feature_extractor": {
|
| 5 |
+
"dither": 0.0,
|
| 6 |
+
"feature_extractor_type": "Gemma4AudioFeatureExtractor",
|
| 7 |
+
"feature_size": 128,
|
| 8 |
+
"fft_length": 512,
|
| 9 |
+
"fft_overdrive": false,
|
| 10 |
+
"frame_length": 320,
|
| 11 |
+
"hop_length": 160,
|
| 12 |
+
"input_scale_factor": 1.0,
|
| 13 |
+
"max_frequency": 8000.0,
|
| 14 |
+
"mel_floor": 0.001,
|
| 15 |
+
"min_frequency": 0.0,
|
| 16 |
+
"padding_side": "right",
|
| 17 |
+
"padding_value": 0.0,
|
| 18 |
+
"per_bin_mean": null,
|
| 19 |
+
"per_bin_stddev": null,
|
| 20 |
+
"preemphasis": 0.0,
|
| 21 |
+
"preemphasis_htk_flavor": true,
|
| 22 |
+
"return_attention_mask": true,
|
| 23 |
+
"sampling_rate": 16000
|
| 24 |
+
},
|
| 25 |
+
"image_processor": {
|
| 26 |
+
"do_convert_rgb": true,
|
| 27 |
+
"do_normalize": false,
|
| 28 |
+
"do_rescale": true,
|
| 29 |
+
"do_resize": true,
|
| 30 |
+
"image_mean": [
|
| 31 |
+
0.0,
|
| 32 |
+
0.0,
|
| 33 |
+
0.0
|
| 34 |
+
],
|
| 35 |
+
"image_processor_type": "Gemma4ImageProcessor",
|
| 36 |
+
"image_seq_length": 280,
|
| 37 |
+
"image_std": [
|
| 38 |
+
1.0,
|
| 39 |
+
1.0,
|
| 40 |
+
1.0
|
| 41 |
+
],
|
| 42 |
+
"max_soft_tokens": 280,
|
| 43 |
+
"patch_size": 16,
|
| 44 |
+
"pooling_kernel_size": 3,
|
| 45 |
+
"resample": 3,
|
| 46 |
+
"rescale_factor": 0.00392156862745098
|
| 47 |
+
},
|
| 48 |
+
"image_seq_length": 280,
|
| 49 |
+
"processor_class": "Gemma4Processor",
|
| 50 |
+
"video_processor": {
|
| 51 |
+
"do_convert_rgb": true,
|
| 52 |
+
"do_normalize": true,
|
| 53 |
+
"do_rescale": true,
|
| 54 |
+
"do_resize": true,
|
| 55 |
+
"do_sample_frames": true,
|
| 56 |
+
"image_mean": [
|
| 57 |
+
0.0,
|
| 58 |
+
0.0,
|
| 59 |
+
0.0
|
| 60 |
+
],
|
| 61 |
+
"image_std": [
|
| 62 |
+
1.0,
|
| 63 |
+
1.0,
|
| 64 |
+
1.0
|
| 65 |
+
],
|
| 66 |
+
"max_soft_tokens": 70,
|
| 67 |
+
"num_frames": 32,
|
| 68 |
+
"patch_size": 16,
|
| 69 |
+
"pooling_kernel_size": 3,
|
| 70 |
+
"resample": 3,
|
| 71 |
+
"rescale_factor": 0.00392156862745098,
|
| 72 |
+
"return_metadata": false,
|
| 73 |
+
"video_processor_type": "Gemma4VideoProcessor"
|
| 74 |
+
}
|
| 75 |
+
}
|