How to use from
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
Quick Links

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
78
Safetensors
Model size
33.7M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support