Downloads · 30 days
0
tugrulkaya/datalora-mistral-7b
datalora-mistral-7b is a text generation model from tugrulkaya. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Mistral-7B base model (~7B parametre) üzerine uygulanan, üç yeniliği tek bir çerçevede birleştiren verimli fine-tuning yöntemi.
Downloads · 30 days
0
Access
Public
Updated Apr 14, 2026
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.pt1 GB · 59%
From the Hugging Face model README
Mistral-7B base model (~7B parametre) üzerine uygulanan, üç yeniliği tek bir çerçevede birleştiren verimli fine-tuning yöntemi.
DATALORA, büyük dil modellerini daha az hesapla fine-tune etmek için geliştirilen üç bileşenli bir eğitim optimizasyonu yöntemidir:
| Özellik | Değer |
|---|---|
| Base model | mistralai/Mistral-7B-v0.3 |
| Parametre (base) | ~7B |
| Eğitilebilir parametre | LoRA adaptörleri (~%1'den az) |
| Yöntem | DATALORA (USN + MoLoRA + Token Pruning) |
| Eğitim verisi | Open-Orca/OpenOrca (5K örnek) |
| LoRA uzman sayısı | 8 |
| LoRA rank | 16 |
| Hedef token tutma | %50 |
| Quantization | 4-bit (NF4) |
| Eğitim epoch | 3 |
| Müfredat | Warmup → Sparsification → Hardening |
Input Tokens
│
▼
┌─────────────────────────────┐
│ Unified Saliency Network │
│ (Shared backbone) │
├──────┬──────────┬───────────┤
│Token │ Router │ Rank │
│Scores│ Logits │ Scale │
└──┬───┴────┬─────┴─────┬─────┘
│ │ │
▼ ▼ ▼
Token Expert Dynamic
Pruning Selection Rank Scaling
│ │ │
▼ ▼ ▼
┌─────────────────────────────┐
│ Mixture of LoRA Experts │
│ (8 specialized adapters) │
└─────────────────────────────┘
Token önemi ve görev zorluğu ilişkili sinyallerdir. Karmaşık girdiler hem daha fazla token hem daha güçlü adaptasyon ister. USN bu ilişkiyi birlikte öğrenerek:
L_total = L_LM + λ_prune · L_retention + α_balance · L_balance
| Terim | Amacı |
|---|---|
L_LM | Standart dil modelleme kaybı |
L_retention | Hedef token tutma oranını sağlar |
L_balance | Uzmanlar arası dengeli kullanımı teşvik eder |
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("tugrulkaya/datalora-mistral-7b")
model = AutoModelForCausalLM.from_pretrained(
"tugrulkaya/datalora-mistral-7b",
torch_dtype=torch.bfloat16,
device_map="auto",
)
prompt = "What is machine learning?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.7,
do_sample=True,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Kendi DATALORA modellerinizi eğitmek için çerçevenin bileşenleri:
from models import DATALORAConfig
config = DATALORAConfig(
base_model="mistralai/Mistral-7B-v0.3",
num_lora_experts=8,
lora_rank=16,
lora_alpha=32,
target_retention=0.5,
num_active_experts=2,
temperature_init=5.0,
temperature_final=0.5,
)
@misc{kaya2025datalora,
title = {DATALORA: Dynamic Adaptive Token-Level Optimization with Rank-Adaptive LoRA},
author = {Kaya, Tuğrul},
year = {2025},
url = {https://huggingface.co/tugrulkaya/datalora-mistral-7b}
}
Apache 2.0 (Mistral-7B-v0.3'ten devralınmıştır)