deeprcurs-staff commited on
Commit
05a6651
·
verified ·
1 Parent(s): 515dd6f

Upload staff-protocol.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. staff-protocol.md +85 -0
staff-protocol.md ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+
5
+ # Staff Protocol — OICIO Internal Operations
6
+
7
+ **Credits:** deepRcurs Labs, @deeprcurs
8
+ **Author:** Mzed Imamkh, @mzedimamkh
9
+ **Version:** 0.6.0 — MatMul-Free CPU-Only
10
+ **Account:** deeprcurs-staff
11
+
12
+ **GitHub:** https://github.com/deepRcurs/OICIO
13
+ **HuggingFace Hub:** https://huggingface.co/deepRcurs/OICIO
14
+
15
+ This document contains internal operational rules for snapshot management, swap handling, and free-tier infrastructure automation. It is separated from the public README to keep the public documentation professional, academic, and focused on architecture.
16
+
17
+ ## Implementation — Snapshot Rules
18
+
19
+ **Snapshot limit:** 128MB / 10K files
20
+
21
+ **Snapshot-safe (<1MB):** Code only `oicio/` Python POC + `oicio-rs/` Rust CPU-only + whitepapers + README + Dockerfile + app.py + .github/workflows
22
+
23
+ **Excluded (can re-download, outside snapshot):**
24
+
25
+ - `.cache/`: Rust toolchain (Cargo, rustup), Python venv (torch 191MB CPU, transformers, safetensors, fastapi, gradio), models (BitNet 2B 1.1GB), swap files (10GB+5GB=14GB active, autoscale 20GB,30GB), checkpoints (32MB)
26
+ - `.venv/`: Python venv
27
+ - `.cargo/`, `target/`, `oicio-rs/target/`: Rust build artifacts
28
+ - `__pycache__/`, `*.pt`, `*.safetensors`: Cache and weights
29
+ - Total excluded: ~17GB
30
+
31
+ **Rules:**
32
+
33
+ - Do not disturb snapshot: keep code <128MB / 10K files, toolchain in `.cache` excluded
34
+ - If RAM insufficient by calculation, swap before OOM: OS swap 10GB,20GB,30GB... in `.cache` + Python/Rust offload via memmap2
35
+
36
+ **Proof:**
37
+
38
+ - Snapshot: 64 files, 526KB total after cleanup, 57 files 466KB after Rust port
39
+ - Swap: 14GB active (10+5), autoscale logic to 20GB demonstrated
40
+ - Training: 6.8M model 50 steps 23.4s loss drop 0.0111 sparsity 31->34% in 1.9GB RAM + 14GB swap
41
+ - Real weights: BitNet 2B 1.1GB safetensors 542 tensors loaded, ternary matmul no mul
42
+ - Rust binary: 501KB native + 607KB musl static (like Needle2 14MB) + 4.5MB generated via rustc CPU-only, all MatMul-free CPU-only
43
+
44
+ ## Infrastructure — Free Tier Without Credit Card/Phone
45
+
46
+ **For automation without manual steps, using 2 tokens (GH + HF) shared:**
47
+
48
+ - **GitHub Token `ghp_...` (repo scope):** Push to `deepRcurs/OICIO`, setup Actions Secrets, trigger training in GitHub Actions Free (2-core CPU, 7GB RAM, 2000 min/month, no credit card, no phone verification). Already proven: Run 32607984794 status completed success with 11 steps success including Rust build 501KB and training from scratch HERE and push checkpoint to HF Hub via secret.
49
+
50
+ - **HF Token `hf_...` (write):** Push to HuggingFace Hub `deepRcurs/OICIO` (100GB private free, 5TB public best-effort, no credit card, no phone). Already proven: 68 files including BitNet 2B 1.1GB real weights + training logs pushed from GitHub Actions.
51
+
52
+ - **MyBinder.org:** No account needed, just GitHub repo public https://github.com/deepRcurs/OICIO, VM 2GB RAM, auto-build https://mybinder.org/v2/gh/deepRcurs/OICIO/main, no credit card, no phone.
53
+
54
+ - **Cloudflare R2:** 10GB free forever, 1M write, 10M read, unlimited egress, no credit card required per tutorial, S3-compatible, for backup.
55
+
56
+ - **GitHub Releases:** Unlimited for public repo, for 14MB binary and whitepapers.
57
+
58
+ **HF Spaces Free CPU per 2026:** As of July 2026, free CPU Basic for Gradio/Docker Spaces discontinued for new free users (community complaint 12 July 2026: "completely eliminate the free CPU Basic instance flavor"), only ZeroGPU remains with quota 3.5 min/day and Static Spaces free. So training in HF Spaces free is not feasible, but GitHub Actions free still works and Hub storage still free.
59
+
60
+ **Final URLs:**
61
+ - GitHub: https://github.com/deepRcurs/OICIO
62
+ - HF Hub: https://huggingface.co/deepRcurs/OICIO
63
+ - MyBinder: https://mybinder.org/v2/gh/deepRcurs/OICIO/main
64
+ - Latest Successful Run: https://github.com/deepRcurs/OICIO/actions/runs/32607984794
65
+
66
+ **Swap Management:**
67
+ - OS-level swap files in `.cache` (excluded): 10GB, 20GB, 30GB... autoscale if RAM >80%
68
+ - Python-level offload via memmap2: offload KV cache, gradients, optimizer states to disk before OOM
69
+ - Rust-level: memmap2 for tensor offloading
70
+
71
+ **Training Automation:**
72
+ - GitHub Actions workflow `.github/workflows/train.yml` triggers on push to main
73
+ - Steps: setup swap 10GB+5GB=14GB, build Rust 501KB, training from scratch HERE 6.8M 50 steps, push checkpoint to HF Hub via HF_TOKEN secret
74
+ - Proven SUCCESS Run 32607984794 with 11 steps success
75
+
76
+ **Storage:**
77
+ - HF Hub: 100GB private free, 5TB public best-effort, no credit card, no phone, just email
78
+ - R2: 10GB free forever, no credit card per tutorial
79
+ - GitHub Releases: unlimited for public repo
80
+
81
+ ---
82
+
83
+ **This file is internal staff protocol, separated from public README to keep public docs professional and academic.**
84
+
85
+ **Credits: deepRcurs Labs @deeprcurs / Mzed Imamkh @mzedimamkh**