JakCwi commited on
Commit
94c07de
·
1 Parent(s): d7070c6

Model card summary; English only; scripts renamed (speed_check / demo_collapse)

Browse files
README.md CHANGED
@@ -14,7 +14,17 @@ tags:
14
 
15
  **Code only — no model weights.**
16
 
17
- **Po polsku, w skrócie.** TetherGate to uczona bramka dla gałęzi sieci (`out = x + g·branch(x)`), której optymalizator nie zepchnie do zera: łączy podłogę zależną od kroku treningu ze sprężyną, która przyciąga próg bramki do ruchomej kotwicy wyznaczanej z sygnału sterującego. Jeden plik w czystym PyTorch, CPU i GPU. Status: eksperymentalny, testowany w naszych treningach, wstępne obserwacje obiecujące. Domyślne `wd = 20` pochodzi z dema; w naszym długim treningu produkcyjnym używaliśmy `wd = 0,5`. Licencja CC BY-NC 4.0.
 
 
 
 
 
 
 
 
 
 
18
 
19
  ## In plain words
20
 
@@ -75,7 +85,7 @@ for step in range(1000):
75
  tethergate_step([gate], step, lr=1e-3, wd=20.0, ramp_start=200, tau=200.0) # AFTER opt.step()
76
  ```
77
 
78
- `python tethergate.py` runs a minimal demo; `example.py` gates two residual adapters; `bench_collapse.py` is a toy test of gate collapse (no gate / free gate / TetherGate, CPU, seconds).
79
 
80
  ## Parameters and how to choose them
81
 
@@ -111,14 +121,14 @@ for step in range(1000):
111
 
112
  ```bash
113
  python test_tethergate.py # unit tests, CPU, seconds
114
- python bench_collapse.py # toy collapse test
115
  ```
116
 
117
  How it works in detail: [TECHNICAL.md](TECHNICAL.md).
118
 
119
  ## Files
120
 
121
- `tethergate.py` (module and demo) · `test_tethergate.py` · `bench_collapse.py` · `example.py` · `TECHNICAL.md` · `LICENSE`
122
 
123
  ## Licence
124
 
 
14
 
15
  **Code only — no model weights.**
16
 
17
+ ## Model card summary
18
+
19
+ | | |
20
+ |---|---|
21
+ | **What this repository is** | A single-file PyTorch module: a learned gate for a network branch that the optimiser cannot push to zero. **No model weights.** |
22
+ | **Developed by** | Jakub Ćwirlej |
23
+ | **Framework / hardware** | Pure PyTorch; CPU and GPU |
24
+ | **Status** | Experimental: used in our own training runs, early observations promising; no published results |
25
+ | **Intended use** | Research on gated branches (adapters, mixture-of-experts style paths, auxiliary modules) whose gates tend to collapse during training |
26
+ | **Out of scope** | Commercial use (licence); drop-in use without checking the parameters on your own model (see Parameters and Pitfalls) |
27
+ | **Licence** | CC BY-NC 4.0 |
28
 
29
  ## In plain words
30
 
 
85
  tethergate_step([gate], step, lr=1e-3, wd=20.0, ramp_start=200, tau=200.0) # AFTER opt.step()
86
  ```
87
 
88
+ `python tethergate.py` runs a minimal demo; `example.py` gates two residual adapters; `demo_collapse.py` is a toy test of gate collapse (no gate / free gate / TetherGate, CPU, seconds).
89
 
90
  ## Parameters and how to choose them
91
 
 
121
 
122
  ```bash
123
  python test_tethergate.py # unit tests, CPU, seconds
124
+ python demo_collapse.py # toy collapse test
125
  ```
126
 
127
  How it works in detail: [TECHNICAL.md](TECHNICAL.md).
128
 
129
  ## Files
130
 
131
+ `tethergate.py` (module and demo) · `test_tethergate.py` · `demo_collapse.py` (a toy demonstration of a plain gate collapsing vs TetherGate; not a benchmark) · `example.py` · `TECHNICAL.md` · `LICENSE`
132
 
133
  ## Licence
134
 
bench_collapse.py → demo_collapse.py RENAMED
@@ -11,7 +11,7 @@ gate also starves the branch of gradient. Variants:
11
  tether : TetherGate (floor 1.0 for `ramp_start` steps, then decay; spring towards g_target)
12
  s = mean |branch(x)| per token (detached), the same for both gated variants.
13
 
14
- python bench_collapse.py [--steps 3000] [--seeds 0 1 2]
15
  """
16
  import argparse
17
 
 
11
  tether : TetherGate (floor 1.0 for `ramp_start` steps, then decay; spring towards g_target)
12
  s = mean |branch(x)| per token (detached), the same for both gated variants.
13
 
14
+ python demo_collapse.py [--steps 3000] [--seeds 0 1 2]
15
  """
16
  import argparse
17