Instructions to use memostarkbaba/MemoGPT-30M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use memostarkbaba/MemoGPT-30M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="memostarkbaba/MemoGPT-30M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("memostarkbaba/MemoGPT-30M") model = AutoModelForCausalLM.from_pretrained("memostarkbaba/MemoGPT-30M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use memostarkbaba/MemoGPT-30M 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 memostarkbaba/MemoGPT-30M # Run inference directly in the terminal: llama cli -hf memostarkbaba/MemoGPT-30M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf memostarkbaba/MemoGPT-30M # Run inference directly in the terminal: llama cli -hf memostarkbaba/MemoGPT-30M
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 memostarkbaba/MemoGPT-30M # Run inference directly in the terminal: ./build/bin/llama cli -hf memostarkbaba/MemoGPT-30M
Use Docker
docker model run hf.co/memostarkbaba/MemoGPT-30M
- Llama new
- LM Studio
- Jan
- vLLM
How to use memostarkbaba/MemoGPT-30M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "memostarkbaba/MemoGPT-30M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "memostarkbaba/MemoGPT-30M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/memostarkbaba/MemoGPT-30M
- SGLang
How to use memostarkbaba/MemoGPT-30M 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 "memostarkbaba/MemoGPT-30M" \ --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": "memostarkbaba/MemoGPT-30M", "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 "memostarkbaba/MemoGPT-30M" \ --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": "memostarkbaba/MemoGPT-30M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use memostarkbaba/MemoGPT-30M with Ollama:
ollama run hf.co/memostarkbaba/MemoGPT-30M
- Unsloth Desktop
- Docker Model Runner
How to use memostarkbaba/MemoGPT-30M with Docker Model Runner:
docker model run hf.co/memostarkbaba/MemoGPT-30M
- Lemonade
How to use memostarkbaba/MemoGPT-30M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull memostarkbaba/MemoGPT-30M
Run and chat with the model
lemonade run user.MemoGPT-30M-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
MemoGPT-30M
MemoGPT-30M, Memo Stark tarafından yerel bir sistemde (NVIDIA GeForce RTX 3060 8GB) sıfırdan eğitilmiş Türkçe bir Decoder-Only Transformer dil modelidir. Hazır model ağırlığı veya önceden eğitilmiş bir taban model kullanılmamıştır; modelin ağırlıkları rastgele başlatılmış (scratch) ve Türkçe veri setiyle eğitilmiştir.
Teknik Özellikler
- Parametre Sayısı: 29,499,904 (~29.5M)
- Mimari: Decoder-Only Transformer (RMSNorm, RoPE, SwiGLU, Causal Multi-Head Self-Attention)
- Katman Sayısı: 8
- Dikkat Başlığı Sayısı: 8
- Gizli Boyut (Embedding Size): 512
- İleri Besleme Boyutu (Intermediate Size): 1376
- Bağlam Uzunluğu (Context Length): 512 token
- Tokenizer: 8,192 kelimelik özel eğitilmiş BPE (Byte-Pair Encoding)
- Eğitim Yöntemi: Pre-training + SFT (Supervised Fine-Tuning) + Maskeli Kimlik Hizalaması
- Donanım: 1x NVIDIA GeForce RTX 3060 (8GB VRAM)
- Geliştirici: Memo Stark
Kullanım
Depoyu klonlayıp veya dosyaları indirip PyTorch ile doğrudan çalıştırabilirsiniz:
import torch
from model import MemoGPT
from tokenizers import Tokenizer
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = Tokenizer.from_file("memogpt_tokenizer.json")
checkpoint = torch.load("memogpt_30m.pt", map_location=device, weights_only=False)
model = MemoGPT(checkpoint["config"]).to(device)
model.load_state_dict(checkpoint["model_state_dict"])
model.eval()
soru = "sen kimsin"
prompt = f"Kullanıcı: {soru}\nAsistan:"
input_ids = torch.tensor([tokenizer.encode(prompt).ids], device=device)
with torch.no_grad():
out = input_ids.clone()
for _ in range(50):
logits, _ = model(out[:, -512:])
next_t = torch.argmax(logits[:, -1, :], dim=-1, keepdim=True)
if next_t.item() == tokenizer.token_to_id("<|eos|>"):
break
out = torch.cat([out, next_t], dim=1)
if "\n" in tokenizer.decode(out[0].tolist()).split("Asistan:")[-1]:
break
cevap = tokenizer.decode(out[0].tolist()).split("Asistan:")[-1].strip()
print("MemoGPT:", cevap)
Proje Amacı
Yerel ve kısıtlı donanımlarda sıfırdan küçük boyutlu Türkçe dil modellerinin eğitilebilirliğini test etmek ve geliştirmek amacıyla hazırlanmıştır.
- Downloads last month
- 224