aigencydev commited on
Commit
214a908
·
verified ·
1 Parent(s): 77d5ecc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -6
README.md CHANGED
@@ -5,6 +5,8 @@ base_model:
5
  - Qwen/Qwen3-14B
6
  language:
7
  - tr
 
 
8
  tags:
9
  - linear-attention
10
  - gated-deltanet
@@ -13,6 +15,7 @@ tags:
13
  - turkish
14
  - erk
15
  - research
 
16
  inference: false
17
  model-index:
18
  - name: Erk-Linear
@@ -32,7 +35,7 @@ model-index:
32
 
33
  **%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.
34
 
35
- > ⚠️ **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.
36
 
37
  > **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)
38
 
@@ -62,13 +65,20 @@ pip install torch transformers flash-linear-attention safetensors huggingface_hu
62
  ```
63
 
64
  ```python
65
- from modeling_erk_linear import load_erk_linear # depodaki dosya
66
- model, tokenizer = load_erk_linear()
67
- ids = tokenizer("Türkiye'nin başkenti", return_tensors="pt").to(model.device)
68
- print(tokenizer.decode(model.generate(**ids, max_new_tokens=20)[0], skip_special_tokens=True))
 
 
 
 
69
  ```
70
 
71
- 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).
 
 
 
72
 
73
  ## Sınırlamalar
74
 
 
5
  - Qwen/Qwen3-14B
6
  language:
7
  - tr
8
+ library_name: transformers
9
+ pipeline_tag: text-generation
10
  tags:
11
  - linear-attention
12
  - gated-deltanet
 
15
  - turkish
16
  - erk
17
  - research
18
+ - custom_code
19
  inference: false
20
  model-index:
21
  - name: Erk-Linear
 
35
 
36
  **%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.
37
 
38
+ > **Gereksinim:** `trust_remote_code=True`, `flash-linear-attention` ve bir CUDA GPU'su. Mimari özeldir (`model_type: erk_linear`) ve Gated DeltaNet çekirdekleri Triton kullanır.
39
 
40
  > **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)
41
 
 
65
  ```
66
 
67
  ```python
68
+ from transformers import AutoModelForCausalLM, AutoTokenizer
69
+
70
+ model = AutoModelForCausalLM.from_pretrained("ecloudtech/Erk-Linear", trust_remote_code=True)
71
+ tok = AutoTokenizer.from_pretrained("ecloudtech/Erk-Linear")
72
+
73
+ msg = [{"role": "user", "content": "Türkiye'nin başkenti neresidir?"}]
74
+ ids = tok.apply_chat_template(msg, add_generation_prompt=True, return_tensors="pt").to(model.device)
75
+ print(tok.decode(model.generate(ids, max_new_tokens=48)[0][ids.shape[1]:], skip_special_tokens=True))
76
  ```
77
 
78
+ Hibrit iki kaynaktan kurulur: **gövde** (32 softmax katmanı + gömme/LM başı) [`ecloudtech/Erk-14B`](https://huggingface.co/ecloudtech/Erk-14B) deposundan, **8 GDN katmanı** bu depodan (`gdn_weights.safetensors`). `from_pretrained` ikisini birleştirip çalışır bir nedensel dil modeli döndürür — `.generate()`, sohbet şablonu ve `use_cache` standart biçimde çalışır.
79
+
80
+ GDN sarmalayıcısı cache'li üretimde recurrent + convolution durumunu adımlar arası **devreder**; çıktı tam-yeniden-hesaplamayla (`use_cache=False`) sayısal gürültüye kadar aynıdır. Sarmalayıcı tek-dizi referans kullanım içindir; eş zamanlı/batch-paylaşımlı serviste her dizi için ayrı durum yönetimi gerekir.
81
+
82
 
83
  ## Sınırlamalar
84