summer commited on
Commit
6f01ef1
·
verified ·
1 Parent(s): b2f877a

Add SVG model card and architecture preview; weights uploading

Browse files
Files changed (4) hide show
  1. README.md +110 -0
  2. assets/architecture.svg +10 -0
  3. assets/header.svg +11 -0
  4. assets/tags.svg +9 -0
README.md ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ base_model: summerMC/Looped-Qwen-pre
6
+ language:
7
+ - ja
8
+ - en
9
+ tags:
10
+ - experimental
11
+ - custom_code
12
+ - graph-neural-network
13
+ - graph-memory
14
+ - looped-transformer
15
+ - research
16
+ ---
17
+
18
+ > **Upload in progress:** model weights are still transferring. Do not load until the final model commit appears.
19
+
20
+ <div align="center">
21
+ <img src="./assets/header.svg" alt="LoopedQwen × GraphEngram" width="100%" />
22
+ <br />
23
+ <img src="./assets/tags.svg" alt="Experimental · JA + EN · 24 loops · 48,491 nodes · 13.63M memory parameters · custom code" width="100%" />
24
+ <br /><br />
25
+ <strong>Looped computation meets learned graph memory.</strong><br />
26
+ <sub>A self-contained bilingual research snapshot by summerMC.</sub>
27
+ <br /><br />
28
+ <a href="#architecture">Architecture</a> · <a href="#loading">Quickstart</a> · <a href="#evaluation">Evaluation</a> · <a href="#limitations">Limitations</a>
29
+ </div>
30
+
31
+ ---
32
+
33
+ > **Research prototype, NOT a production chatbot.** Conversation, arithmetic and code-generation tests remain poor, often producing unrelated numbers. Do not interpret lower language-model loss as general reasoning or instruction-following quality.
34
+
35
+ This repository contains a consolidated snapshot of a repaired LoopedQwen backbone, learned graph-memory modules, and the matching token graph. No separate base-model or adapter download is needed when loading this package. The graph module cannot be algebraically folded into a dense weight matrix: “merged” means a self-contained custom architecture, not a LoRA-only merge.
36
+
37
+ GraphEngram is an independent experimental graph-attention mechanism, not the official DeepSeek Engram implementation or a reproduction of its paper results.
38
+
39
+ ## Architecture
40
+
41
+ <img src="./assets/architecture.svg" alt="Causal routing, learned graph attention and LoopedQwen fusion" width="100%" />
42
+
43
+ - Pinned base: `summerMC/Looped-Qwen-pre`, revision `eaa834598f3e6b479d1f72b51b6933422b9b8a9c`.
44
+ - Six shared GDN groups, four inner steps each: 24 effective steps, hidden size 2048.
45
+ - Prior backbone adapters are consolidated into the exported backbone parameters.
46
+ - Memory inserted before outer groups 0 and 3.
47
+ - 48,491 shared token nodes and 88,076 directed adjacency edges.
48
+ - Node width 128; 13,626,882 learned memory parameters.
49
+ - Causal exact token bigram/trigram routing, up to 8 candidates, one-hop graph attention with degree cap 8.
50
+ - Graph topology is fixed; node embeddings, attention projections and fusion gates are learned.
51
+ - Graph construction uses training documents only. Old English node IDs and weights were preserved during Japanese expansion.
52
+
53
+ ## Loading
54
+
55
+ Use a recent compatible Transformers environment. Export/evaluation used PyTorch 2.11.0 and Transformers 5.20.2. `flash-linear-attention` is optional acceleration; backend differences can affect numerical outputs.
56
+
57
+ ```python
58
+ import torch
59
+ from transformers import AutoTokenizer, AutoModelForCausalLM
60
+
61
+ repo = "summerMC/LoopedQwen-GraphEngram-ja-en"
62
+ tok = AutoTokenizer.from_pretrained(repo)
63
+ model = AutoModelForCausalLM.from_pretrained(
64
+ repo, trust_remote_code=True, dtype=torch.bfloat16, device_map="cuda"
65
+ ).eval()
66
+ ids = tok.apply_chat_template(
67
+ [{"role": "user", "content": "こんにちは。"}],
68
+ add_generation_prompt=True, enable_thinking=False,
69
+ return_tensors="pt", return_dict=True
70
+ )["input_ids"].to("cuda")
71
+ out = model.generate(ids, max_new_tokens=32, do_sample=False, use_cache=False)
72
+ print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
73
+ ```
74
+
75
+ Inspect custom code before enabling `trust_remote_code`. Generation is greedy, unpadded batch size 1 only. Cached decoding, concurrent forwards and production serving integrations are unsupported. Each output token recomputes the prefix. The graph checksum is checked during loading. Keep `graph.json` with the weights and configuration.
76
+
77
+ Toggle memory for ablations: `model.network.enabled = False`.
78
+
79
+ ## Training provenance
80
+
81
+ - English source: `HuggingFaceFW/fineweb`, `sample-10BT`, revision `9bb295ddab0e05d785b879661af7260fed5140fc`.
82
+ - Japanese source: `HuggingFaceFW/fineweb-2`, `jpn_Jpan`, revision `af9c13333eb981300149d5ca60a8e9d659b276b9`.
83
+ - Dataset cards identify ODC-BY. Check dataset/source-content terms for downstream redistribution and use. The token graph itself retains training-text fragments; it is not a privacy-preserving representation.
84
+ - Whole-document hashing separates train/dev/test before truncation. No near-duplicate or base-pretraining contamination audit was performed.
85
+ - Base was frozen during graph training. The immediate bilingual continuation trained 36,864 Japanese + 36,864 English tokens, not the entire downloaded corpus.
86
+ - Earlier graph stages and the repaired base are described in the included reports/design document.
87
+ - Parent optimizer was not retained for the first bilingual continuation; weights were resumed with a fresh optimizer.
88
+
89
+ ## Evaluation
90
+
91
+ Standalone reloaded bilingual snapshot, eight held-out documents per language, full documents evaluated in independent chunks:
92
+
93
+ | Corpus | Target tokens | GNN off NLL | GNN on NLL |
94
+ |---|---:|---:|---:|
95
+ | Japanese | 4,895 | 4.5203 | 4.4736 |
96
+ | English | 4,912 | 4.0961 | 4.0122 |
97
+
98
+ Eight additional development prompts: math 0/2, required code functions 0/2, extraction 1/2 for both on/off. Conversation remains inappropriate/repetitive. Generated code was not executed. These are small diagnostics, not standardized benchmark or Opus-equivalence results.
99
+
100
+ ## Limitations
101
+
102
+ - Weak instruction following and numerical-answer bias in the repaired backbone.
103
+ - No established improvement in Japanese/English conversation, math or code generation.
104
+ - No demonstrated learning-speed advantage over official Engram, RAG or ordinary fine-tuning at matched quality.
105
+ - No proven compression advantage or lossless reconstruction of the complete source corpus from the model graph.
106
+ - No billion/trillion-token context guarantee; lexical routing has limited recall and CPU overhead.
107
+ - Frozen random-initialized new node vectors require learning; storing a text node is not equivalent to learning its facts.
108
+ - Source text may contain errors, personal information or malicious instructions. No dedicated filtering/safety training was performed for this prototype.
109
+
110
+ The model is published for reproducibility and architecture experiments, not capability claims.
assets/architecture.svg ADDED
assets/header.svg ADDED
assets/tags.svg ADDED