初始化项目,由ModelHub XC社区提供模型

Model: thelamapi/next-270m
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-19 21:17:26 +08:00
commit 5b696cb2aa
15 changed files with 51871 additions and 0 deletions

44
.gitattributes vendored Normal file
View File

@@ -0,0 +1,44 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text
next-270m-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
next-270m-f16.gguf filter=lfs diff=lfs merge=lfs -text
next-270m-f32.gguf filter=lfs diff=lfs merge=lfs -text
assets/bnr.png filter=lfs diff=lfs merge=lfs -text
assets/banner.png filter=lfs diff=lfs merge=lfs -text
assets/bannsr.png filter=lfs diff=lfs merge=lfs -text
assets/banne5r.png filter=lfs diff=lfs merge=lfs -text
assets/banner3basic.png filter=lfs diff=lfs merge=lfs -text

308
README.md Normal file
View File

@@ -0,0 +1,308 @@
---
language: tr
license: mit
tags:
- turkish
- türkiye
- english
- ai
- lamapi
- gemma3
- next
- next-x1
- efficient
- text-generation
- open-source
- 1b
- 270m
- finetune
- gguf
- huggingface
- large-language-model
- llm
- causal
- transformer
- artificial-intelligence
- machine-learning
- ai-research
- natural-language-processing
- nlp
- finetuned
- lightweight
- creative
- summarization
- question-answering
- chat-model
- generative-ai
- optimized-model
- unsloth
- trl
- sft
- chemistry
- biology
- finance
- legal
- music
- art
- code
- climate
- medical
- agent
- text-generation-inference
pipeline_tag: text-generation
datasets:
- mlabonne/FineTome-100k
- ITCL/FineTomeOs
- Gryphe/ChatGPT-4o-Writing-Prompts
- dongguanting/ARPO-SFT-54K
- GreenerPastures/All-Your-Base-Full
- Gryphe/Opus-WritingPrompts
- HuggingFaceH4/MATH-500
- mlabonne/smoltalk-flat
- mlabonne/natural_reasoning-formatted
- OpenSPG/KAG-Thinker-training-dataset
- uclanlp/Brief-Pro
- CognitiveKernel/CognitiveKernel-Pro-SFT
- SuperbEmphasis/Claude-4.0-DeepSeek-R1-RP-SFWish
- QuixiAI/dolphin-r1
- mlabonne/lmsys-arena-human-sft-55k
library_name: transformers
---
<img src='assets/banner.png'>
# 🚀 Next-270M (xt330)
### *Lightweight, Efficient, and Türkiye-Focused AI*
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Language: English](https://img.shields.io/badge/Language-Multilingual-red.svg)]()
[![HuggingFace](https://img.shields.io/badge/🤗-Lamapi/Next--270M-orange.svg)](https://huggingface.co/Lamapi/next-270m)
[![Discord](https://cdn.modrinth.com/data/cached_images/e84c69448cbf878a167f996d63e1a253437fcea2.png)](https://discord.gg/XgH4EpyPD2)
---
<style>
table { width:fit-content; border-collapse:separate; border-spacing:0 3px;font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;background:rgba(15,22,32,0.4);border-radius:16px;padding: 10px; border:none;transition:.2s all ease;}
thead th { text-align:center; padding:4px 10px; font-size:13px; text-transform:uppercase; color:rgb(200,200,200);border:none; }
tbody tr { transition: transform 0.18s ease, box-shadow 0.18s ease; border:none !important;transition:.2s all ease;border-radius:16px;background:rgba(0, 0, 0, 0.38);}
tbody .turkish:hover {box-shadow:0 6px 15px rgba(0, 0, 0, 0.27);scale:1.01;background:rgba(80, 38, 38, 0.6);}
tbody .next:hover {box-shadow:0 6px 15px rgba(0, 0, 0, 0.27);scale:1.02;background: rgba(0, 59, 225, 1)}
tbody tr:hover { box-shadow:0 0px 15px rgba(102, 102, 102, 0.13); background:rgba(139, 139, 139, 0.16)}
td { padding:8px 10px;border:0px transparent !important;outline:transparent !important; text-align:center; }
td:first-child { font-weight:600;text-align:left }
/* tbody .turkish td { background: rgba(255, 0, 0, 0.2) !important; color:rgb(200,200,200); font-weight:400;border:0px !important; scale:1.0; } */
/* tbody .next td { background: rgba(0, 89, 255, 0.49)!important; color:rgb(200,200,200); font-weight:600;border:0px !important; scale:1.00;outline:none;border:none !important;} */
.next{
background: rgba(0, 89, 255, 0.49);
}
.turkish{
background:rgba(51, 34, 34, 0.64);
}
tbody tr td:first-child { border-top-left-radius:12px; border-bottom-left-radius:12px; }
tbody tr td:last-child { border-top-right-radius:12px; border-bottom-right-radius:12px; } strong{
font-size:16px;font-weight:700;
}
em{opacity:0.7;font-size:11px !important;}
</style>
## 📖 Overview
**Next-270M** is a **270-million parameter causal language model** based on **Gemma 3**, designed for **efficiency, low-resource deployment, and reasoning-focused natural language understanding**.
Key highlights:
* Extremely **lightweight** — can run on consumer GPUs with low VRAM.
* Optimized for **text reasoning, summarization, and creative generation**.
* Supports **Turkish natively** while remaining multilingual.
* Open-source and transparent for research and applications.
Ideal for **developers, students, and organizations** needing **fast, reliable, and low-resource text-generation**.
---
# Our Next 1B and Next 4B models are leading to all of the tiny models in benchmarks.
<table>
<thead>
<tr>
<th>Model</th>
<th>MMLU (5-shot) %</th>
<th>MMLU-Pro %</th>
<th>GSM8K %</th>
<th>MATH %</th>
</tr>
</thead>
<tbody>
<tr class="next">
<td data-label="Model">Next 4B preview <em>Version s325</em></td>
<td data-label="MMLU (5-shot) %">84.6</td>
<td data-label="MMLU-Pro %">66.9</td>
<td data-label="GSM8K %">82.7</td>
<td data-label="MATH %"><strong>70.5</strong></td>
</tr>
<tr class="next">
<td data-label="Model">Next 1B <em>Version t327</em></td>
<td data-label="MMLU (5-shot) %"><strong>87.3</strong></td>
<td data-label="MMLU-Pro %"><strong>69.2</strong></td>
<td data-label="GSM8K %"><strong>90.5</strong></td>
<td data-label="MATH %">70.1</td>
</tr>
<tr>
<td data-label="Model">Qwen 3 0.6B</td>
<td data-label="MMLU (5-shot) %">52.81</td>
<td data-label="MMLU-Pro %">37.6</td>
<td data-label="GSM8K %">60.7</td>
<td data-label="MATH %">20.5</td>
</tr>
<tr>
<td data-label="Model">Llama 3.2 1B</td>
<td data-label="MMLU (5-shot) %">49.3</td>
<td data-label="MMLU-Pro %">44.4</td>
<td data-label="GSM8K %">11.9</td>
<td data-label="MATH %">30.6</td>
</tr>
<tr class="turkish">
<td data-label="Model">Kumru 7B <em>not verified</em></td>
<td data-label="MMLU (5-shot) %">30.7</td>
<td data-label="MMLU-Pro %">28.6</td>
<td data-label="GSM8K %">15.38</td>
<td data-label="MATH %">6.4</td>
</tr>
</tbody>
</table>
---
# Also, our Next Z1 model is leading to state-of-the-art models in some of the Benchmarks.
<table>
<thead>
<tr>
<th>Model</th>
<th>MMLU (5-shot) %</th>
<th>MMLU-Pro %</th>
<th>GSM8K %</th>
<th>MATH %</th>
</tr>
</thead>
<tbody>
<tr class="next">
<td data-label="Model">Next Z1 <em>Version l294</em></td>
<td data-label="MMLU (5-shot) %"><strong>97.3</strong></td>
<td data-label="MMLU-Pro %"><strong>94.2</strong></td>
<td data-label="GSM8K %">97.7</td>
<td data-label="MATH %">93.2</td>
</tr>
<tr class="next">
<td data-label="Model">Next Z1 <em>Version l294</em> (no tool)</td>
<td data-label="MMLU (5-shot) %">94.7</td>
<td data-label="MMLU-Pro %">90.1</td>
<td data-label="GSM8K %">94.5</td>
<td data-label="MATH %">88.7</td>
</tr>
<tr>
<td data-label="Model">GPT 5</td>
<td data-label="MMLU (5-shot) %">92.5</td>
<td data-label="MMLU-Pro %">87.0</td>
<td data-label="GSM8K %"><strong>98.4</strong></td>
<td data-label="MATH %"><strong>96.0</strong></td>
</tr>
<tr>
<td data-label="Model">Claude Opus 4.1 (Thinking)</td>
<td data-label="MMLU (5-shot) %">~92.0</td>
<td data-label="MMLU-Pro %">87.8</td>
<td data-label="GSM8K %">84.7</td>
<td data-label="MATH %">95.4</td>
</tr>
</tbody>
</table>
---
## 🎯 Goals
1. **Lightweight Efficiency:** Run smoothly on low-resource devices.
2. **Reasoning-Focused:** Provide logical and coherent text outputs.
3. **Accessibility:** Fully open-source with clear documentation.
4. **Multilingual Adaptability:** Turkish-focused but supports other languages.
---
## ✨ Key Features
| Feature | Description |
| --------------------------- | --------------------------------------------------------------------- |
| 🔋 Lightweight Architecture | Optimized for low VRAM usage; ideal for small GPUs or CPU deployment. |
| 🇹🇷 Turkish & Multilingual | Handles complex Turkish prompts accurately. |
| 🧠 Reasoning Capabilities | Logical chain-of-thought for question-answering and problem-solving. |
| 📊 Consistent Outputs | Reliable and reproducible results across multiple runs. |
| 🌍 Open Source | Transparent, research-friendly, and community-driven. |
---
## 📐 Model Specifications
| Specification | Details |
| ------------------ | ---------------------------------------------------------------------- |
| Base Model | Gemma 3 |
| Parameter Count | 270 Million |
| Architecture | Transformer, causal LLM |
| Fine-Tuning Method | Instruction fine-tuning (SFT) with Turkish and multilingual datasets |
| Optimizations | Quantization-ready (q8, f16, f32) |
| Use Cases | Text generation, summarization, Q&A, creative writing, reasoning tasks |
---
## 🚀 Installation & Usage
### Use the model:
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "Lamapi/next-270m"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
# Chat message
messages = [
{"role": "system", "content": "You are Next-X1, a smart and concise AI assistant trained by Lamapi. Always respond in the user's language. Proudly made in Turkey."},
{"role": "user", "content": "Hello, how are you?"}
]
# Prepare input with Tokenizer
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
# Output from the model
output = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(output[0], skip_special_tokens=True))
```
<div style='width:700px;'>
<div style='background-color:rgba(0,140,255,0.5);border-radius:16px;border-bottom-right-radius:0px;padding:3px 10px;width:fit-content;max-width:400px;margin-left:250px;margin-top:-15px;margin-bottom:10px;'>
Hello, how are you?
</div>
<div style='background-color:rgba(42,42,40,0.7);border-radius:16px;border-bottom-left-radius:0px;padding:3px 10px;width:fit-content;max-width:400px;'>
I'm fine, thank you. How are you?
</div>
</div>
---
## 📄 License
MIT License — free to use, modify, and distribute. Attribution appreciated.
---
## 📞 Contact & Support
* 📧 **Email:** [lamapicontact@gmail.com](mailto:lamapicontact@gmail.com)
* 🤗 **HuggingFace:** [Lamapi](https://huggingface.co/Lamapi)
---
> **Next-270M** — Lightweight, **efficient, and reasoning-focused**, bringing **Turkeys AI forward** on low-resource hardware.
[![Follow on HuggingFace](https://img.shields.io/badge/Follow-HuggingFace-yellow?logo=huggingface)](https://huggingface.co/Lamapi)

3
added_tokens.json Normal file
View File

@@ -0,0 +1,3 @@
{
"<image_soft_token>": 262144
}

3
assets/banner.png Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22dc2644a59ed9760ed2dcbb255aaa780edaf6c88cc226381831153e6cd90f7c
size 114527

47
chat_template.jinja Normal file
View File

@@ -0,0 +1,47 @@
{{ bos_token }}
{%- if messages[0]['role'] == 'system' -%}
{%- if messages[0]['content'] is string -%}
{%- set first_user_prefix = messages[0]['content'] + '
' -%}
{%- else -%}
{%- set first_user_prefix = messages[0]['content'][0]['text'] + '
' -%}
{%- endif -%}
{%- set loop_messages = messages[1:] -%}
{%- else -%}
{%- set first_user_prefix = "" -%}
{%- set loop_messages = messages -%}
{%- endif -%}
{%- for message in loop_messages -%}
{%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
{{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
{%- endif -%}
{%- if (message['role'] == 'assistant') -%}
{%- set role = "model" -%}
{%- else -%}
{%- set role = message['role'] -%}
{%- endif -%}
{{ '<start_of_turn>' + role + '
' + (first_user_prefix if loop.first else "") }}
{%- if message['content'] is string -%}
{{ message['content'] | trim }}
{%- elif message['content'] is iterable -%}
{%- for item in message['content'] -%}
{%- if item['type'] == 'image' -%}
{{ '<start_of_image>' }}
{%- elif item['type'] == 'text' -%}
{{ item['text'] | trim }}
{%- endif -%}
{%- endfor -%}
{%- else -%}
{{ raise_exception("Invalid content type") }}
{%- endif -%}
{{ '<end_of_turn>
' }}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{ '<start_of_turn>model
' }}
{%- endif -%}

56
config.json Normal file
View File

@@ -0,0 +1,56 @@
{
"_sliding_window_pattern": 6,
"architectures": [
"Gemma3ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_logit_softcapping": null,
"bos_token_id": 2,
"eos_token_id": 106,
"final_logit_softcapping": null,
"head_dim": 256,
"hidden_activation": "gelu_pytorch_tanh",
"hidden_size": 640,
"initializer_range": 0.02,
"intermediate_size": 2048,
"layer_types": [
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention"
],
"max_position_embeddings": 32768,
"model_type": "gemma3_text",
"num_attention_heads": 4,
"num_hidden_layers": 18,
"num_key_value_heads": 1,
"pad_token_id": 0,
"query_pre_attn_scalar": 256,
"rms_norm_eps": 1e-06,
"rope_local_base_freq": 10000.0,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": 512,
"torch_dtype": "bfloat16",
"transformers_version": "4.55.4",
"unsloth_fixed": true,
"unsloth_version": "2025.10.5",
"use_bidirectional_attention": false,
"use_cache": true,
"vocab_size": 262144
}

14
generation_config.json Normal file
View File

@@ -0,0 +1,14 @@
{
"bos_token_id": 2,
"cache_implementation": "hybrid",
"do_sample": true,
"eos_token_id": [
1,
106
],
"max_length": 32768,
"pad_token_id": 0,
"top_k": 64,
"top_p": 0.95,
"transformers_version": "4.55.4"
}

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6903c5db993aead89b677a594d2519345e59f6e4040b0c5e423d1a79cd95ebb
size 536223056

3
next-270m-f16.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6aa39dadf495322779213cfce7bc00e9f7a0cff4e8228050312be61c310a5ab4
size 542834880

3
next-270m-f32.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:064f554bab049f2134d5507ab2704471ae908906b826ff7e7dc75a127e25c56e
size 1078919360

3
next-270m-q8_0.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:152e268e21a6993b6a84c28d46bfc2a6a027ee8042ca070773869f4860380729
size 291545280

33
special_tokens_map.json Normal file
View File

@@ -0,0 +1,33 @@
{
"boi_token": "<start_of_image>",
"bos_token": {
"content": "<bos>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eoi_token": "<end_of_image>",
"eos_token": {
"content": "<end_of_turn>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"image_token": "<image_soft_token>",
"pad_token": {
"content": "<pad>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

3
tokenizer.json Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
size 33384568

3
tokenizer.model Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
size 4689074

51345
tokenizer_config.json Normal file

File diff suppressed because it is too large Load Diff