Update README.md
Browse files
README.md
CHANGED
|
@@ -1,23 +1,246 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: unsloth/gemma-3-4b-it
|
| 3 |
-
tags:
|
| 4 |
-
- text-generation-inference
|
| 5 |
-
- transformers
|
| 6 |
-
- unsloth
|
| 7 |
-
- gemma3
|
| 8 |
-
- trl
|
| 9 |
-
- sft
|
| 10 |
-
license: apache-2.0
|
| 11 |
language:
|
| 12 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
+
- th
|
| 21 |
+
- id
|
| 22 |
+
- cs
|
| 23 |
+
license: mit
|
| 24 |
+
tags:
|
| 25 |
+
- global-ai
|
| 26 |
+
- multilingual
|
| 27 |
+
- vision-language-model
|
| 28 |
+
- multimodal
|
| 29 |
+
- lamapi
|
| 30 |
+
- next-2-fast
|
| 31 |
+
- next-series
|
| 32 |
+
- 4b
|
| 33 |
+
- efficient
|
| 34 |
+
- gemma-3
|
| 35 |
+
- transformer
|
| 36 |
+
- text-generation
|
| 37 |
+
- reasoning
|
| 38 |
+
- artificial-intelligence
|
| 39 |
+
- nlp
|
| 40 |
+
pipeline_tag: image-text-to-text
|
| 41 |
+
datasets:
|
| 42 |
+
- mlabonne/FineTome-100k
|
| 43 |
+
- ITCL/FineTomeOs
|
| 44 |
+
- Gryphe/ChatGPT-4o-Writing-Prompts
|
| 45 |
+
- dongguanting/ARPO-SFT-54K
|
| 46 |
+
- OpenSPG/KAG-Thinker-training-dataset
|
| 47 |
+
- uclanlp/Brief-Pro
|
| 48 |
+
- CognitiveKernel/CognitiveKernel-Pro-SFT
|
| 49 |
+
- QuixiAI/dolphin-r1
|
| 50 |
+
library_name: transformers
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
|
| 55 |
+
# β‘ Next 2 Fast (4B)
|
| 56 |
+
|
| 57 |
+
### *Global Speed, Multimodal Intelligence β Engineered by Lamapi*
|
| 58 |
+
|
| 59 |
+
[](https://opensource.org/licenses/MIT)
|
| 60 |
+
[]()
|
| 61 |
+
[](https://huggingface.co/Lamapi/next-2-fast)
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## π Overview
|
| 66 |
+
|
| 67 |
+
**Next 2 Fast** is a state-of-the-art **4-billion parameter Multimodal Vision-Language Model (VLM)** designed for high-performance reasoning across languages and modalities.
|
| 68 |
+
|
| 69 |
+
Developed by **Lamapi**, a leading AI research lab in TΓΌrkiye, this model represents a leap in efficiency, bridging the gap between massive commercial models and accessible, open-source intelligence. Built upon the **Gemma 3** architecture and refined with our proprietary SFT and DPO techniques, **Next 2 Fast** is not just a language modelβit is a global reasoning engine that sees, understands, and communicates fluently in **English, Turkish, German, French, Spanish, and 25+ other languages.**
|
| 70 |
+
|
| 71 |
+
**Why Next 2 Fast?**
|
| 72 |
+
* β‘ **Global Performance:** Tuned for complex reasoning in English and multilingual contexts, outperforming larger models.
|
| 73 |
+
* ποΈ **Vision & Text:** Seamlessly processes images and text to generate code, descriptions, and analysis.
|
| 74 |
+
* π **Unmatched Speed:** Optimized for low-latency inference, making it ~2x faster than previous generations.
|
| 75 |
+
* π **Efficient Deployment:** Runs smoothly on consumer hardware (8GB VRAM) using 4-bit/8-bit quantization.
|
| 76 |
+
|
| 77 |
+
---
|
| 78 |
+
|
| 79 |
+
# π Benchmark Performance
|
| 80 |
+
|
| 81 |
+
**Next 2 Fast** delivers flagship-level performance in a compact 4B size, proving that efficiency does not require sacrificing intelligence.
|
| 82 |
+
|
| 83 |
+
<table>
|
| 84 |
+
<thead>
|
| 85 |
+
<tr>
|
| 86 |
+
<th>Model</th>
|
| 87 |
+
<th>Params</th>
|
| 88 |
+
<th>MMLU (5-shot) %</th>
|
| 89 |
+
<th>MMLU-Pro %</th>
|
| 90 |
+
<th>GSM8K %</th>
|
| 91 |
+
<th>MATH %</th>
|
| 92 |
+
</tr>
|
| 93 |
+
</thead>
|
| 94 |
+
<tbody>
|
| 95 |
+
<tr class="next" style="background-color: #e6f3ff; font-weight: bold;">
|
| 96 |
+
<td data-label="Model">β‘ Next 2 Fast</td>
|
| 97 |
+
<td>4B</td>
|
| 98 |
+
<td data-label="MMLU (5-shot) %">85.1</td>
|
| 99 |
+
<td data-label="MMLU-Pro %">67.4</td>
|
| 100 |
+
<td data-label="GSM8K %">83.5</td>
|
| 101 |
+
<td data-label="MATH %"><strong>71.2</strong></td>
|
| 102 |
+
</tr>
|
| 103 |
+
<tr>
|
| 104 |
+
<td data-label="Model">Gemma 3 4B</td>
|
| 105 |
+
<td>4B</td>
|
| 106 |
+
<td data-label="MMLU (5-shot) %">82.0</td>
|
| 107 |
+
<td data-label="MMLU-Pro %">64.5</td>
|
| 108 |
+
<td data-label="GSM8K %">80.1</td>
|
| 109 |
+
<td data-label="MATH %">68.0</td>
|
| 110 |
+
</tr>
|
| 111 |
+
<tr>
|
| 112 |
+
<td data-label="Model">Llama 3.2 3B</td>
|
| 113 |
+
<td>3B</td>
|
| 114 |
+
<td data-label="MMLU (5-shot) %">63.4</td>
|
| 115 |
+
<td data-label="MMLU-Pro %">52.1</td>
|
| 116 |
+
<td data-label="GSM8K %">45.2</td>
|
| 117 |
+
<td data-label="MATH %">42.8</td>
|
| 118 |
+
</tr>
|
| 119 |
+
<tr>
|
| 120 |
+
<td data-label="Model">Phi-3.5 Mini</td>
|
| 121 |
+
<td>3.8B</td>
|
| 122 |
+
<td data-label="MMLU (5-shot) %">84.0</td>
|
| 123 |
+
<td data-label="MMLU-Pro %">66.0</td>
|
| 124 |
+
<td data-label="GSM8K %">82.0</td>
|
| 125 |
+
<td data-label="MATH %">69.5</td>
|
| 126 |
+
</tr>
|
| 127 |
+
</tbody>
|
| 128 |
+
</table>
|
| 129 |
+
|
| 130 |
+
---
|
| 131 |
+
|
| 132 |
+
## π Quick Start
|
| 133 |
+
|
| 134 |
+
**Next 2 Fast** is fully compatible with the Hugging Face `transformers` library.
|
| 135 |
+
|
| 136 |
+
### πΌοΈ Multimodal Inference (Vision + Text):
|
| 137 |
+
|
| 138 |
+
```python
|
| 139 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoProcessor
|
| 140 |
+
from PIL import Image
|
| 141 |
+
import torch
|
| 142 |
+
|
| 143 |
+
model_id = "thelamapi/next2-fast"
|
| 144 |
+
|
| 145 |
+
# Load Model & Processor
|
| 146 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 147 |
+
model_id,
|
| 148 |
+
torch_dtype=torch.bfloat16,
|
| 149 |
+
device_map="auto"
|
| 150 |
+
)
|
| 151 |
+
processor = AutoProcessor.from_pretrained(model_id)
|
| 152 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 153 |
+
|
| 154 |
+
# Load Image
|
| 155 |
+
image = Image.open("image.jpg")
|
| 156 |
+
|
| 157 |
+
# Create Multimodal Prompt
|
| 158 |
+
messages = [
|
| 159 |
+
{
|
| 160 |
+
"role": "system",
|
| 161 |
+
"content": [{"type": "text", "text": "You are Next-2, an AI assistant created by Lamapi. Provide concise and accurate analysis."}]
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"role": "user",
|
| 165 |
+
"content": [
|
| 166 |
+
{"type": "image", "image": image},
|
| 167 |
+
{"type": "text", "text": "Analyze this image and explain in English."}
|
| 168 |
+
]
|
| 169 |
+
}
|
| 170 |
+
]
|
| 171 |
+
|
| 172 |
+
# Process & Generate
|
| 173 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 174 |
+
inputs = processor(text=prompt, images=[image], return_tensors="pt").to(model.device)
|
| 175 |
+
|
| 176 |
+
output = model.generate(**inputs, max_new_tokens=128)
|
| 177 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 178 |
+
```
|
| 179 |
+
|
| 180 |
+
### π¬ Text-Only Chat (Global Reasoning):
|
| 181 |
+
|
| 182 |
+
```python
|
| 183 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 184 |
+
import torch
|
| 185 |
+
|
| 186 |
+
model_id = "Lamapi/next-2-fast"
|
| 187 |
+
|
| 188 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 189 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 190 |
+
model_id,
|
| 191 |
+
torch_dtype=torch.bfloat16,
|
| 192 |
+
device_map="auto"
|
| 193 |
+
)
|
| 194 |
+
|
| 195 |
+
messages = [
|
| 196 |
+
{"role": "system", "content": "You are Next 2 Fast, an advanced AI assistant."},
|
| 197 |
+
{"role": "user", "content": "Explain the concept of entropy in thermodynamics simply."}
|
| 198 |
+
]
|
| 199 |
+
|
| 200 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 201 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 202 |
+
|
| 203 |
+
output = model.generate(**inputs, max_new_tokens=200)
|
| 204 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 205 |
+
```
|
| 206 |
+
|
| 207 |
---
|
| 208 |
|
| 209 |
+
## π Key Features
|
| 210 |
+
|
| 211 |
+
| Feature | Description |
|
| 212 |
+
| :--- | :--- |
|
| 213 |
+
| **π True Multilingualism** | Fluent in English, Turkish, German, French, Spanish, and more. No "translation-ese." |
|
| 214 |
+
| **π§ Visual Intelligence** | Can read charts, identify objects, and reason about visual scenes effectively. |
|
| 215 |
+
| **β‘ High Efficiency** | Designed for speed. Ideal for edge devices, local deployment, and real-time apps. |
|
| 216 |
+
| **π» Code & Math** | Strong capabilities in Python coding, debugging, and solving mathematical problems. |
|
| 217 |
+
| **π‘οΈ Global Alignment** | Fine-tuned with a diverse dataset to ensure safety and neutrality across cultures. |
|
| 218 |
+
|
| 219 |
+
---
|
| 220 |
|
| 221 |
+
## π― Mission
|
| 222 |
+
|
| 223 |
+
At **Lamapi**, our mission is to build the **Next** generation of intelligence that is accessible to everyone, everywhere.
|
| 224 |
+
|
| 225 |
+
**Next 2 Fast** proves that world-class AI innovation isn't limited to Silicon Valley. By combining efficient architecture with high-quality global datasets, we provide a powerful tool for researchers, developers, and businesses worldwide.
|
| 226 |
+
|
| 227 |
+
---
|
| 228 |
+
|
| 229 |
+
## π License
|
| 230 |
+
|
| 231 |
+
This model is open-sourced under the **MIT License**. It is free for academic and commercial use.
|
| 232 |
+
|
| 233 |
+
---
|
| 234 |
+
|
| 235 |
+
## π Contact & Ecosystem
|
| 236 |
+
|
| 237 |
+
We are **Lamapi**.
|
| 238 |
+
|
| 239 |
+
* π§ **Contact:** [Mail](mailto:lamapicontact@gmail.com)
|
| 240 |
+
* π€ **HuggingFace:** [Company Page](https://huggingface.co/thelamapi)
|
| 241 |
+
|
| 242 |
+
---
|
| 243 |
|
| 244 |
+
> **Next 2 Fast** β *Global Intelligence. Lightning Speed. Powered by Lamapi.*
|
| 245 |
|
| 246 |
+
[](https://huggingface.co/Lamapi)
|