Image-Text-to-Text
Transformers
Safetensors
GGUF
gemma3
turkish
türkiye
english
ai
lamapi
next
next-x1
efficient
text-generation
open-source
4b
huggingface
large-language-model
llm
causal
transformer
artificial-intelligence
machine-learning
ai-research
natural-language-processing
language
multilingual
multimodal
nlp
finetuned
lightweight
creative
summarization
question-answering
chat
generative-ai
optimized
unsloth
trl
sft
chemistry
code
biology
finance
legal
music
art
state-of-the-art
climate
medical
agent
text-generation-inference
Merge
dense
conversational
Instructions to use thelamapi/next-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thelamapi/next-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="thelamapi/next-4b") 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("thelamapi/next-4b") model = AutoModelForMultimodalLM.from_pretrained("thelamapi/next-4b", 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
- llama.cpp
How to use thelamapi/next-4b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf thelamapi/next-4b:F16 # Run inference directly in the terminal: llama cli -hf thelamapi/next-4b:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf thelamapi/next-4b:F16 # Run inference directly in the terminal: llama cli -hf thelamapi/next-4b:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf thelamapi/next-4b:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf thelamapi/next-4b:F16
Use Docker
docker model run hf.co/thelamapi/next-4b:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use thelamapi/next-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thelamapi/next-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thelamapi/next-4b", "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/thelamapi/next-4b:F16
- SGLang
How to use thelamapi/next-4b 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 "thelamapi/next-4b" \ --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": "thelamapi/next-4b", "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 "thelamapi/next-4b" \ --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": "thelamapi/next-4b", "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" } } ] } ] }' - Ollama
How to use thelamapi/next-4b with Ollama:
ollama run hf.co/thelamapi/next-4b:F16
- Unsloth Desktop
- Docker Model Runner
How to use thelamapi/next-4b with Docker Model Runner:
docker model run hf.co/thelamapi/next-4b:F16
- Lemonade
How to use thelamapi/next-4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull thelamapi/next-4b:F16
Run and chat with the model
lemonade run user.next-4b-F16
List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -169,23 +169,23 @@ This model is ideal for **researchers, developers, and organizations** who need
|
|
| 169 |
<tbody>
|
| 170 |
<tr class="next">
|
| 171 |
<td data-label="Model">Next 4B preview <em>Version s325</em></td>
|
| 172 |
-
<td data-label="MMLU (5-shot) %">84.
|
| 173 |
-
<td data-label="MMLU-Pro %">66.
|
| 174 |
<td data-label="GSM8K %">82.7</td>
|
| 175 |
-
<td data-label="MATH %">70.5</td>
|
| 176 |
</tr>
|
| 177 |
<tr class="next">
|
| 178 |
<td data-label="Model">Next 1B <em>Version t327</em></td>
|
| 179 |
-
<td data-label="MMLU (5-shot) %"><strong>
|
| 180 |
-
<td data-label="MMLU-Pro %"><strong>69.
|
| 181 |
-
<td data-label="GSM8K %"><strong>
|
| 182 |
-
<td data-label="MATH %">
|
| 183 |
</tr>
|
| 184 |
<tr>
|
| 185 |
<td data-label="Model">Qwen 3 0.6B</td>
|
| 186 |
<td data-label="MMLU (5-shot) %">52.81</td>
|
| 187 |
-
<td data-label="MMLU-Pro %">37.
|
| 188 |
-
<td data-label="GSM8K %">60.
|
| 189 |
<td data-label="MATH %">20.5</td>
|
| 190 |
</tr>
|
| 191 |
<tr>
|
|
@@ -197,9 +197,9 @@ This model is ideal for **researchers, developers, and organizations** who need
|
|
| 197 |
</tr>
|
| 198 |
<tr class="turkish">
|
| 199 |
<td data-label="Model">Kumru 7B</td>
|
| 200 |
-
<td data-label="MMLU (5-shot) %">30.
|
| 201 |
-
<td data-label="MMLU-Pro %">28.
|
| 202 |
-
<td data-label="GSM8K %">
|
| 203 |
<td data-label="MATH %">-</td>
|
| 204 |
</tr>
|
| 205 |
</tbody>
|
|
@@ -221,15 +221,15 @@ This model is ideal for **researchers, developers, and organizations** who need
|
|
| 221 |
<tbody>
|
| 222 |
<tr class="next">
|
| 223 |
<td data-label="Model">Next Z1 <em>Version l294</em></td>
|
| 224 |
-
<td data-label="MMLU (5-shot) %"><strong>97.
|
| 225 |
<td data-label="MMLU-Pro %"><strong>94.2</strong></td>
|
| 226 |
<td data-label="GSM8K %">97.7</td>
|
| 227 |
-
<td data-label="MATH %">93.
|
| 228 |
</tr>
|
| 229 |
<tr class="next">
|
| 230 |
<td data-label="Model">Next Z1 <em>Version l294</em> (no tool)</td>
|
| 231 |
<td data-label="MMLU (5-shot) %">94.7</td>
|
| 232 |
-
<td data-label="MMLU-Pro %">90.
|
| 233 |
<td data-label="GSM8K %">94.5</td>
|
| 234 |
<td data-label="MATH %">88.7</td>
|
| 235 |
</tr>
|
|
|
|
| 169 |
<tbody>
|
| 170 |
<tr class="next">
|
| 171 |
<td data-label="Model">Next 4B preview <em>Version s325</em></td>
|
| 172 |
+
<td data-label="MMLU (5-shot) %">84.6</td>
|
| 173 |
+
<td data-label="MMLU-Pro %">66.9</td>
|
| 174 |
<td data-label="GSM8K %">82.7</td>
|
| 175 |
+
<td data-label="MATH %"><strong>70.5</strong></td>
|
| 176 |
</tr>
|
| 177 |
<tr class="next">
|
| 178 |
<td data-label="Model">Next 1B <em>Version t327</em></td>
|
| 179 |
+
<td data-label="MMLU (5-shot) %"><strong>87.3</strong></td>
|
| 180 |
+
<td data-label="MMLU-Pro %"><strong>69.2</strong></td>
|
| 181 |
+
<td data-label="GSM8K %"><strong>90.5</strong></td>
|
| 182 |
+
<td data-label="MATH %">70.1</td>
|
| 183 |
</tr>
|
| 184 |
<tr>
|
| 185 |
<td data-label="Model">Qwen 3 0.6B</td>
|
| 186 |
<td data-label="MMLU (5-shot) %">52.81</td>
|
| 187 |
+
<td data-label="MMLU-Pro %">37.6</td>
|
| 188 |
+
<td data-label="GSM8K %">60.7</td>
|
| 189 |
<td data-label="MATH %">20.5</td>
|
| 190 |
</tr>
|
| 191 |
<tr>
|
|
|
|
| 197 |
</tr>
|
| 198 |
<tr class="turkish">
|
| 199 |
<td data-label="Model">Kumru 7B</td>
|
| 200 |
+
<td data-label="MMLU (5-shot) %">30.7</td>
|
| 201 |
+
<td data-label="MMLU-Pro %">28.6</td>
|
| 202 |
+
<td data-label="GSM8K %">15.38</td>
|
| 203 |
<td data-label="MATH %">-</td>
|
| 204 |
</tr>
|
| 205 |
</tbody>
|
|
|
|
| 221 |
<tbody>
|
| 222 |
<tr class="next">
|
| 223 |
<td data-label="Model">Next Z1 <em>Version l294</em></td>
|
| 224 |
+
<td data-label="MMLU (5-shot) %"><strong>97.3</strong></td>
|
| 225 |
<td data-label="MMLU-Pro %"><strong>94.2</strong></td>
|
| 226 |
<td data-label="GSM8K %">97.7</td>
|
| 227 |
+
<td data-label="MATH %">93.2</td>
|
| 228 |
</tr>
|
| 229 |
<tr class="next">
|
| 230 |
<td data-label="Model">Next Z1 <em>Version l294</em> (no tool)</td>
|
| 231 |
<td data-label="MMLU (5-shot) %">94.7</td>
|
| 232 |
+
<td data-label="MMLU-Pro %">90.1</td>
|
| 233 |
<td data-label="GSM8K %">94.5</td>
|
| 234 |
<td data-label="MATH %">88.7</td>
|
| 235 |
</tr>
|