Instructions to use keyvan-ai/Mankei-1B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use keyvan-ai/Mankei-1B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="keyvan-ai/Mankei-1B-Chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("keyvan-ai/Mankei-1B-Chat") model = AutoModelForCausalLM.from_pretrained("keyvan-ai/Mankei-1B-Chat", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use keyvan-ai/Mankei-1B-Chat 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 keyvan-ai/Mankei-1B-Chat:Q4_K_M # Run inference directly in the terminal: llama cli -hf keyvan-ai/Mankei-1B-Chat:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf keyvan-ai/Mankei-1B-Chat:Q4_K_M # Run inference directly in the terminal: llama cli -hf keyvan-ai/Mankei-1B-Chat:Q4_K_M
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 keyvan-ai/Mankei-1B-Chat:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf keyvan-ai/Mankei-1B-Chat:Q4_K_M
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 keyvan-ai/Mankei-1B-Chat:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf keyvan-ai/Mankei-1B-Chat:Q4_K_M
Use Docker
docker model run hf.co/keyvan-ai/Mankei-1B-Chat:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use keyvan-ai/Mankei-1B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "keyvan-ai/Mankei-1B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "keyvan-ai/Mankei-1B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/keyvan-ai/Mankei-1B-Chat:Q4_K_M
- SGLang
How to use keyvan-ai/Mankei-1B-Chat 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 "keyvan-ai/Mankei-1B-Chat" \ --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": "keyvan-ai/Mankei-1B-Chat", "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 "keyvan-ai/Mankei-1B-Chat" \ --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": "keyvan-ai/Mankei-1B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use keyvan-ai/Mankei-1B-Chat with Ollama:
ollama run hf.co/keyvan-ai/Mankei-1B-Chat:Q4_K_M
- Unsloth Studio
How to use keyvan-ai/Mankei-1B-Chat 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 keyvan-ai/Mankei-1B-Chat 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 keyvan-ai/Mankei-1B-Chat to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for keyvan-ai/Mankei-1B-Chat to start chatting
- Docker Model Runner
How to use keyvan-ai/Mankei-1B-Chat with Docker Model Runner:
docker model run hf.co/keyvan-ai/Mankei-1B-Chat:Q4_K_M
- Lemonade
How to use keyvan-ai/Mankei-1B-Chat with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull keyvan-ai/Mankei-1B-Chat:Q4_K_M
Run and chat with the model
lemonade run user.Mankei-1B-Chat-Q4_K_M
List all available models
lemonade list
- Atomic Chat

Mankei-1B-Chat (experimentell)
Deutsches Chat-Sprachmodell mit 1,01 Mrd. Parametern, von Grund auf in Deutschland trainiert — eigener deutscher Tokenizer (32k), auf einer einzelnen Karte. Gebaut für den CPU-Betrieb, und die Grundlage der Mankei-326M-Embedder- und Mankei-326M-Reranker-Modelle.
Fähigkeiten
- Deutsche Faktenabfragen (z. B. „Hauptstadt von Bayern" → „München")
- Rückfrage bzw. Zurückhaltung bei Unsicherheit statt erfundener Antworten
- Flüssiges, grammatisches Deutsch
Benchmark — deutsches MMLU (deutsche From-Scratch-Modelle)
Multiple-Choice per Log-Likelihood auf deutschem MMLU, verglichen mit anderen von Grund auf trainierten deutschen Modellen (faire Klasse):
| Modell | Größe | Accuracy |
|---|---|---|
| Mankei-1B-Chat | 1,01 B | 23,0 % |
| gpt2-xl-wechsel-german | 1,56 B | 20,2 % |
| LLäMmlein-1B | 1,10 B | 20,0 % |
| german-gpt2 (dbmdz) | 0,12 B | 20,0 % |
Mankei-1B führt das deutsche From-Scratch-Feld an. Kleine From-Scratch-Modelle liegen bei reinem Faktenwissen generell nahe dem Zufallsniveau (25 %) — Mankeis Stärke sind deutscher Sprachfluss und souveräner lokaler Betrieb, nicht der Wissens-Benchmark.
Verwendung
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("keyvan-ai/Mankei-1B-Chat")
model = AutoModelForCausalLM.from_pretrained("keyvan-ai/Mankei-1B-Chat", dtype=torch.bfloat16)
msgs = [{"role": "user", "content": "Was ist die Hauptstadt von Bayern?"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, max_new_tokens=64, temperature=0.7, top_p=0.9,
repetition_penalty=1.15, do_sample=True)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
Empfohlenes Sampling: temperature 0.7 · top_p 0.9 · repetition_penalty 1.15.
Lokaler Betrieb (GGUF)
GGUF-Quantisierungen (f16 → Q3_K_M) direkt in diesem Repo — und gespiegelt im eigenen keyvan-ai/Mankei-1B-Chat-GGUF (Model-Tree):
| Quantisierung | Größe | Download |
|---|---|---|
| f16 | 1,9 GB | Mankei-1B-Chat-f16.gguf |
| Q8_0 | 1,0 GB | Mankei-1B-Chat-q8_0.gguf |
| Q6_K | 854 MB | Mankei-1B-Chat-q6_k.gguf |
| Q5_K_M | 727 MB | Mankei-1B-Chat-q5_k_m.gguf |
| Q4_K_M | 637 MB | Mankei-1B-Chat-q4_k_m.gguf |
| Q3_K_M | 512 MB | Mankei-1B-Chat-q3_k_m.gguf |
# Ollama
ollama run hf.co/keyvan-ai/Mankei-1B-Chat:Q4_K_M
# llama.cpp
llama-cli -hf keyvan-ai/Mankei-1B-Chat:Q4_K_M
Empfohlenes Sampling: temperature 0.7 · top_p 0.9 · repetition_penalty 1.15.
Architektur
Llama-Architektur · 1,013 Mrd. Parameter · hidden 1536 · 32 Layer · 24/6 Heads (GQA) · SwiGLU · RMSNorm · RoPE θ 500 000 · Kontext 4096 · Vokabular 32 768 · tied embeddings.
Trainingsdaten
Pretraining auf lizenzgeprüften deutschen und englischen Quellen (EN gezielt für Mathematik, Wissenschaft, Bildung):
| Quelle | Domäne | Lizenz |
|---|---|---|
| FineWeb2-HQ | DE Web (Top-Filter) | ODC-By 1.0 |
| FinePDFs | DE PDF-Volltext | ODC-By 1.0 |
| FineMath | EN Mathematik | ODC-By 1.0 |
| OpenWebMath | EN Mathematik | ODC-By 1.0 |
| FineWeb-Edu | EN Web (Bildung) | ODC-By 1.0 |
| Wikipedia (de) | DE Enzyklopädie | CC-BY-SA 4.0 |
| German Commons (openlegaldata / openalex) | DE Recht & Wissenschaft | ≥ CC-BY-SA 4.0 |
Chat-SFT: selbst erzeugt und CC0, gegen ein festes Prüfset dekontaminiert.
- Downloads last month
- -
