Instructions to use thelamapi/next-270m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thelamapi/next-270m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thelamapi/next-270m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("thelamapi/next-270m") model = AutoModelForCausalLM.from_pretrained("thelamapi/next-270m") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use thelamapi/next-270m with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="thelamapi/next-270m", filename="next-270m-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use thelamapi/next-270m with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf thelamapi/next-270m:F16 # Run inference directly in the terminal: llama-cli -hf thelamapi/next-270m:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf thelamapi/next-270m:F16 # Run inference directly in the terminal: llama-cli -hf thelamapi/next-270m:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf thelamapi/next-270m:F16 # Run inference directly in the terminal: ./llama-cli -hf thelamapi/next-270m:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf thelamapi/next-270m:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf thelamapi/next-270m:F16
Use Docker
docker model run hf.co/thelamapi/next-270m:F16
- LM Studio
- Jan
- vLLM
How to use thelamapi/next-270m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thelamapi/next-270m" # 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-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thelamapi/next-270m:F16
- SGLang
How to use thelamapi/next-270m 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-270m" \ --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-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-270m" \ --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-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use thelamapi/next-270m with Ollama:
ollama run hf.co/thelamapi/next-270m:F16
- Unsloth Studio new
How to use thelamapi/next-270m with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thelamapi/next-270m to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thelamapi/next-270m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for thelamapi/next-270m to start chatting
- Docker Model Runner
How to use thelamapi/next-270m with Docker Model Runner:
docker model run hf.co/thelamapi/next-270m:F16
- Lemonade
How to use thelamapi/next-270m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull thelamapi/next-270m:F16
Run and chat with the model
lemonade run user.next-270m-F16
List all available models
lemonade list
🚀 Next-270M (xt330)
Lightweight, Efficient, and Türkiye-Focused AI
📖 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.
| Model | MMLU (5-shot) % | MMLU-Pro % | GSM8K % | MATH % |
|---|---|---|---|---|
| Next 4B preview Version s325 | 84.6 | 66.9 | 82.7 | 70.5 |
| Next 1B Version t327 | 87.3 | 69.2 | 90.5 | 70.1 |
| Qwen 3 0.6B | 52.81 | 37.6 | 60.7 | 20.5 |
| Llama 3.2 1B | 49.3 | 44.4 | 11.9 | 30.6 |
| Kumru 7B not verified | 30.7 | 28.6 | 15.38 | 6.4 |
Also, our Next Z1 model is leading to state-of-the-art models in some of the Benchmarks.
| Model | MMLU (5-shot) % | MMLU-Pro % | GSM8K % | MATH % |
|---|---|---|---|---|
| Next Z1 Version l294 | 97.3 | 94.2 | 97.7 | 93.2 |
| Next Z1 Version l294 (no tool) | 94.7 | 90.1 | 94.5 | 88.7 |
| GPT 5 | 92.5 | 87.0 | 98.4 | 96.0 |
| Claude Opus 4.1 (Thinking) | ~92.0 | 87.8 | 84.7 | 95.4 |
🎯 Goals
- Lightweight Efficiency: Run smoothly on low-resource devices.
- Reasoning-Focused: Provide logical and coherent text outputs.
- Accessibility: Fully open-source with clear documentation.
- 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:
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))
📄 License
MIT License — free to use, modify, and distribute. Attribution appreciated.
📞 Contact & Support
- 📧 Email: lamapicontact@gmail.com
- 🤗 HuggingFace: Lamapi
Next-270M — Lightweight, efficient, and reasoning-focused, bringing Turkey’s AI forward on low-resource hardware.
- Downloads last month
- 233
