Text Generation
Transformers
Turkish
erk_linear
linear-attention
gated-deltanet
hybrid-attention
efficient-attention
turkish
erk
research
custom_code
conversational
Eval Results (legacy)
Instructions to use ecloudtech/Erk-Linear with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ecloudtech/Erk-Linear with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ecloudtech/Erk-Linear", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ecloudtech/Erk-Linear", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ecloudtech/Erk-Linear with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ecloudtech/Erk-Linear" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ecloudtech/Erk-Linear", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ecloudtech/Erk-Linear
- SGLang
How to use ecloudtech/Erk-Linear 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 "ecloudtech/Erk-Linear" \ --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": "ecloudtech/Erk-Linear", "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 "ecloudtech/Erk-Linear" \ --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": "ecloudtech/Erk-Linear", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ecloudtech/Erk-Linear with Docker Model Runner:
docker model run hf.co/ecloudtech/Erk-Linear
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,21 +3,21 @@ license: apache-2.0
|
|
| 3 |
base_model: Qwen/Qwen3-14B
|
| 4 |
language:
|
| 5 |
- tr
|
| 6 |
-
library_name: transformers
|
| 7 |
tags:
|
| 8 |
- linear-attention
|
| 9 |
- gated-deltanet
|
| 10 |
- hybrid-attention
|
| 11 |
- turkish
|
| 12 |
- erk
|
| 13 |
-
|
| 14 |
-
pipeline_tag: text-generation
|
| 15 |
---
|
| 16 |
|
| 17 |
# Erk-Linear
|
| 18 |
|
| 19 |
**%20-lineer hibrit:** Erk-14B'nin 40 dikkat katmanından 8'i, subquadratic bir lineer-dikkat mekanizmasına ([Gated DeltaNet](https://github.com/fla-org/flash-linear-attention)) damıtılmıştır. Kalan 32 katman softmax "çıpa" olarak korunur.
|
| 20 |
|
|
|
|
|
|
|
| 21 |
> **Kod, protokol, teknik rapor:** [github.com/ecloudtechnology/erk-linear](https://github.com/ecloudtechnology/erk-linear) · **Temel model:** [Qwen3-14B](https://huggingface.co/Qwen/Qwen3-14B)
|
| 22 |
|
| 23 |
## Konumlandırma
|
|
@@ -28,21 +28,38 @@ Bu, sıfırdan bir mimari değil, güçlü bir açık modelin üzerinde bir **mi
|
|
| 28 |
|
| 29 |
| Değerlendirme | Erk (orijinal) | Erk-Linear | Fark | %95 GA |
|
| 30 |
|---|---:|---:|---:|---:|
|
| 31 |
-
| TurkishMMLU (
|
| 32 |
| TurkMorfBench (morfoloji) | %54,3 | %53,3 | −1,0 | [−3,9 ; +2,0] |
|
| 33 |
| NIAH geri-çağırma (≤4K) | %100 | %100 | ±0 | — |
|
| 34 |
| Perplexity (@512/@2048) | 1,00× | 1,03× | +%3 | — |
|
| 35 |
|
| 36 |
-
İki benchmark'ta (MMLU, morfoloji) fark istatistiksel olarak anlamlı değildir.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
## Kullanım
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
## Sınırlamalar
|
| 43 |
|
| 44 |
- %20 lineer — muhafazakâr, kalite-öncelikli bir orandır (kayıpsıza-yakın sınır ~%22; ötesi kapasite duvarına çarpar).
|
|
|
|
| 45 |
- Değerlendirme iki benchmark + iki kontrolle sınırlıdır; ≥16K uzun-bağlam geri-çağırma ve decode hızı gelecek iştir.
|
|
|
|
| 46 |
- Erk, Qwen3-14B üzerine kuruludur.
|
| 47 |
|
| 48 |
## Lisans
|
|
|
|
| 3 |
base_model: Qwen/Qwen3-14B
|
| 4 |
language:
|
| 5 |
- tr
|
|
|
|
| 6 |
tags:
|
| 7 |
- linear-attention
|
| 8 |
- gated-deltanet
|
| 9 |
- hybrid-attention
|
| 10 |
- turkish
|
| 11 |
- erk
|
| 12 |
+
inference: false
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# Erk-Linear
|
| 16 |
|
| 17 |
**%20-lineer hibrit:** Erk-14B'nin 40 dikkat katmanından 8'i, subquadratic bir lineer-dikkat mekanizmasına ([Gated DeltaNet](https://github.com/fla-org/flash-linear-attention)) damıtılmıştır. Kalan 32 katman softmax "çıpa" olarak korunur.
|
| 18 |
|
| 19 |
+
> ⚠️ **Standart yükleme çalışmaz.** Bu özel bir hibrit mimaridir (`model_type: erk-linear-hybrid`); `AutoModelForCausalLM`, `pipeline`, vLLM ve SGLang **doğrudan çalışmaz**. Yüklemek için aşağıdaki özel loader (`modeling_erk_linear.py`) ve `flash-linear-attention` gerekir.
|
| 20 |
+
|
| 21 |
> **Kod, protokol, teknik rapor:** [github.com/ecloudtechnology/erk-linear](https://github.com/ecloudtechnology/erk-linear) · **Temel model:** [Qwen3-14B](https://huggingface.co/Qwen/Qwen3-14B)
|
| 22 |
|
| 23 |
## Konumlandırma
|
|
|
|
| 28 |
|
| 29 |
| Değerlendirme | Erk (orijinal) | Erk-Linear | Fark | %95 GA |
|
| 30 |
|---|---:|---:|---:|---:|
|
| 31 |
+
| TurkishMMLU (held-out 750) ¹ | %68,8 | %68,1 | −0,7 | [−2,9 ; +1,7] |
|
| 32 |
| TurkMorfBench (morfoloji) | %54,3 | %53,3 | −1,0 | [−3,9 ; +2,0] |
|
| 33 |
| NIAH geri-çağırma (≤4K) | %100 | %100 | ±0 | — |
|
| 34 |
| Perplexity (@512/@2048) | 1,00× | 1,03× | +%3 | — |
|
| 35 |
|
| 36 |
+
İki benchmark'ta (MMLU, morfoloji) fark istatistiksel olarak anlamlı değildir.
|
| 37 |
+
|
| 38 |
+
<sub>¹ TurkishMMLU, ko-eğitim checkpoint seçiminde kullanılan 150 sorunun **hariç** tutulduğu held-out 750 üzerinde raporlanır (seçim sızıntısı yok); tam 900'de fark −0,3'tür. Ham soru-bazlı tahminler [repoda](https://github.com/ecloudtechnology/erk-linear/blob/main/results/raw_predictions.json).</sub>
|
| 39 |
+
|
| 40 |
+
**Verimlilik:** kısa-bağlam prefill'inde kazanç yoktur; uzun bağlamda KV-cache belleği azalır — 8 GDN katmanı sabit ~43 MB durum tuttuğu için net tasarruf bağlam uzadıkça %20'ye yaklaşır (4K'da −%14, 64K'da −%20 / ~2,1 GB; GDN durumu dahil ölçüldü). Ayrıntı: teknik rapor.
|
| 41 |
|
| 42 |
## Kullanım
|
| 43 |
|
| 44 |
+
```bash
|
| 45 |
+
pip install torch transformers flash-linear-attention safetensors huggingface_hub
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from modeling_erk_linear import load_erk_linear # depodaki dosya
|
| 50 |
+
model, tokenizer = load_erk_linear()
|
| 51 |
+
ids = tokenizer("Türkiye'nin başkenti", return_tensors="pt").to(model.device)
|
| 52 |
+
print(tokenizer.decode(model.generate(**ids, max_new_tokens=20)[0], skip_special_tokens=True))
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Loader Erk-14B tabanını ve 8 katmanın Gated DeltaNet ağırlıklarını indirip hibridi kurar. GDN sarmalayıcısı cache'li üretimde (`use_cache=True`) recurrent + convolution durumunu adımlar arası devreder; `model.generate()` çıktısı tam-yeniden-hesaplamayla sayısal gürültüye kadar aynıdır. Adımlar: [GitHub deposu](https://github.com/ecloudtechnology/erk-linear).
|
| 56 |
|
| 57 |
## Sınırlamalar
|
| 58 |
|
| 59 |
- %20 lineer — muhafazakâr, kalite-öncelikli bir orandır (kayıpsıza-yakın sınır ~%22; ötesi kapasite duvarına çarpar).
|
| 60 |
+
- TurkishMMLU checkpoint'i 150 MMLU-probe sorusuyla seçildi; sonuç bu sorular hariç held-out 750'de raporlanır.
|
| 61 |
- Değerlendirme iki benchmark + iki kontrolle sınırlıdır; ≥16K uzun-bağlam geri-çağırma ve decode hızı gelecek iştir.
|
| 62 |
+
- Referans loader tek-dizi kullanım içindir (eş zamanlı/batch servis ayrı durum yönetimi gerektirir).
|
| 63 |
- Erk, Qwen3-14B üzerine kuruludur.
|
| 64 |
|
| 65 |
## Lisans
|