GitHub - PJHkorea/egregore-core-jax: High-performance, branchless numerical stability kernels and compiler-optimized core infrastructure for advanced JAX/XLA deep learning architectures. ยท GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
PJHkorea
egregore-core-jax
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>25 Commits<br>25 Commits
egregore_core_jax
egregore_core_jax
LICENSE
LICENSE
README.md
README.md
pyproject.toml
pyproject.toml
View all files
Repository files navigation
๐งฉ Core Modules Specifications (ํต์ฌ ๋ชจ๋ ๋ช ์ธ)
1. ๐ ๏ธ optimizers.py โ Branchless PyTree LLRD Engine
JAX/Optax ์ ์ ๋ค์ ์ํด ์ธํฐํ๋ฆฌํฐ์ ์กฐ๊ฑด ๋ถ๊ธฐ ๊ฐ์ ์ ์ ๊ฑฐํ ์ด๊ณ ์ ๊ณ์ธต๋ณ ์ฐจ๋ฑ ์ต์ ํ(LLRD) ํฉํ ๋ฆฌ ๋ชจ๋์ ๋๋ค.
[KR] ๋ชฉ์ ๋ฐ ๊ธฐ๋ฅ : ๋ณต์กํ PyTree ๊ฐ์ค์น ์ฌ์ ์ค์บ ์ ๋ฐ์ํ๋ ํ์ด์ฌ ํธ์คํธ ์ค๋ฒํค๋์ hasattr ๋ถ๊ธฐ ์์ธก ์คํจ(Branch Stall)๋ฅผ 'getattr ์ค๋ฆฌ ํ์ดํ ์์ฑ ๋ง์คํน'๊ณผ '์ผํญ ๋์์ ๋ง์คํฌ'๋ฅผ ํตํด ํํํํ์ต๋๋ค. ๋น ๊ฒฝ๋ก ์ ์ ํฌ๋์๋ฅผ ๋ฐฉ์ดํ๋ safe_path ์ตํฉ ๊ธฐ์ ์ด ํ์ฌ๋์ด ์์ผ๋ฉฐ, custom_router ์์กด์ฑ ์ฃผ์ (DI)์ ์ง์ํ์ฌ LLM ๋ฑ ๋ชจ๋ JAX ๋ชจ๋ธ์ ๋ฒ์ฉ ๊ฒฐํฉ์ ์ํจ์ด ๋ชฉ์ ์ ๋๋ค.
[EN] Purpose & Function : A high-velocity Layer-wise Learning Rate Decay (LLRD) factory module crafted to eliminate conversational python interpreter overhead for JAX/Optax developers. It flattens the conventional hasattr branch stalls during complex PyTree scanning by utilizing 'getattr Duck-Typing Attribute Masking' and inline algebraic string-matching. Equipped with a robust safe_path concatenation technique to safeguard against empty path crashes, it offers a custom_router dependency injection interface for universal integration into any JAX-based architecture, including LLMs.
๐ก TL;DR (ํต์ฌ ์์ฝ) :
[KR] ๋ฌธ์ ์ ํด๋ฒ : JAX์์ ๋ ์ด์ด๋ณ๋ก ํ์ต๋ฅ ์ ๋ค๋ฅด๊ฒ ์ค ๋(LLRD), ๊ฐ์ค์น ํธ๋ฆฌ ๊ฒฝ๋ก๋ฅผ ์ค์บํ๋๋ผ ํ์ด์ฌ์ if/else ์กฐ๊ฑด๋ฌธ์ ์ฐ๊ฒ ๋๋ฉด GPU/TPU ์ปดํ์ผ ๊ทธ๋ํ๊ฐ ์กฐ๊ฐ๋๊ณ ๋ณ๋ชฉ์ด ๋ฐ์ํฉ๋๋ค. ์ด ๋ชจ๋์ ์กฐ๊ฑด ๋ถ๊ธฐ๋ฅผ ์์ ํ ํ๊ดดํ๊ณ "gate" * (is_gate) + "backbone" * (not_is_gate) ๊ฐ์ ์ธ๋ผ์ธ ๋์์ ๋ฌธ์์ด ์ฐ์ฐ ๋ง์ผ๋ก ํ๋ผ๋ฏธํฐ๋ฅผ ํ๋์จ์ด ๋ ๋ฒจ์์ ์ด๊ณ ์ ๋ผ์ฐํ ํฉ๋๋ค.
[EN] Problem & Solution : When implementing Layer-wise Learning Rate Decay (LLRD) in JAX, using standard Python if/else predicates to scan weight tree paths fragments the GPU/TPU compilation graph and triggers severe branch stalls. This module thoroughly obliterates conditional branching, utilizing inline algebraic string-manipulation like "gate" * (is_gate) + "backbone" * (not_is_gate) to execute ultra-high-speed parameter routing natively within hardware-level constraints.
๐ [Update] Production-Ready Enterprise Silicon MUX Architecture :
[KR] ์งํ๋ ํต์ฌ ์ฌ์ : ์์ ํ๋ ์์ํฌ(Optax)์ ๋ฌธ์์ด ๊ธฐ๋ฐ ๋์ ๋๋ฆฌ ๋ผ์ฐํ ์ ์ฝ๋ง์ ์ ์ฐํ์ ์ผ๋ก ์์ ํ ๋ฐ๋ฉธํ์ต๋๋ค. ๋ถ๋ฆฐ ๊ฒฐ๊ณผ๊ฐ(True/False)์ ๊ณง๋ฐ๋ก * 1.0f ๋์ ์ฐ์ฐ์ ์ ๋ํ์ฌ ๊ฐ์๊ธฐ ALU ๋จ์ถ ๋ ์ง์คํฐ๊ฐ ์๋ชจํ ์ ์๋ float32 ์ ์ ๋ฆฌํฐ๋ด ๋ง์คํฌ๋ก ์ฆ์ ์์ถ(is_gate = (root_key_name == "gate") * 1.0f)ํฉ๋๋ค. ๋ค์ค ์ตํฐ๋ง์ด์ ๋ถ๊ธฐ ์ฒด์ธ์ ์์ ํ ์๋ฉธ์ํค๊ณ , ๋จ์ผ ๊ธฐ์ AdamW ์์์ ๊ฐ์๊ธฐ ๋ด๋ถ์ ๋จ์ผ ํด๋ญ ์๋ค๋ง๋ฅด ๊ณฑ(Hadamard Product) ํ ์ ์ฐ์ฐ๋ง์ผ๋ก ์ ๋ฐ์ดํธ ์ค์ผ์ผ์ ์ ์ดํ์ฌ XLA ์ปดํ์ผ๋ฌ๊ฐ ์จ์นฉ SRAM ๋ด๋ถ์ ์ต์ ์ ๋จ์ผ ์ตํฉ ์ปค๋(Fused Kernel)์ ๊ฐ์ ํฌ๋ฉ์ด์ ํ๋๋ก ๋ฆฌ์์ง๋์ด๋ง๋์์ต๋๋ค.
[EN] Advanced Evolution Mechanics : Fundamentally extinguishes framework-level string dictionary routing. By directly appending * 1.0f to boolean evaluations, it compresses dynamic states into float32 literal register masks (is_gate = (root_key_name == "gate") * 1.0f) tailored for the accelerator ALU. This demolishes multi-optimizer branch chains, consolidating execution onto a unified underlying AdamW engine where layer-wise scaling is driven strictly via single-cycle inline Hadamard tensor products, forcing the XLA compiler to generate high-density Fused Kernels directly inside on-chip SRAM.
2. ๐ geometry.py โ Static Virtual View Curvature Sensor
๋ค์ฐจ์ ๋ฐฐ์น ์ ๋ ฅ์ ์ ๋์ ์ธ ํ์ฅ ์์์๋ ์ ์ ์ปดํ์ผ ๋ฌด๊ฒฐ์ฑ์ ๋ชฉํ๋ก ํ๋ ๊ณ ์ ๋ค์์ฒด ๊ณก๋ฅ (๊ณต๊ฐ ๋ถ์ฐ) ๊ณ์ธก ๋ชจ๋์ ๋๋ค.
[KR] ๋ชฉ์ ๋ฐ ๊ธฐ๋ฅ : JAX ํ๊ฒฝ์์ jnp.reshape๋ ์ฐจ์ ํํ ์กฐ๋ฆฝ ์ ์ ์ ๋ค์ ๊ณจ์น๋ฅผ ์ฉ์ด๋ ํ์ ์ถ์ ์๋ฌ(ConcretizationTypeError)๋ฅผ static_argnums=(1,) ์ ์ ์์ ๋ฝ(Lock) ๊ฐ๋๋ ์ผ๋ก ๋ง์๋ดค์ต๋๋ค. ์์์ N์ฐจ์ ๋ฐฐ์น ์ ๋ ฅ([B, D], [B, T, D] ๋ฑ)์ด ์ธ์ ๋๋๋ผ๋ ๋จ์ผ ์ ์ ๊ฐ์ ๋ทฐ ๋ ๋ฒจ์ ์ธ๋ผ์ธ ์ฐ์ ๋ฉ๋ชจ๋ฆฌ ๋ ์ด์์์ผ๋ก ๋ณํํ์ฌ ํ๋์จ์ด ์จ์นฉ ๋ฆฌ๋์ ์๋๋ฅผ ๊ทน๋ํํจ์ด ๋ชฉ์ ์ ๋๋ค.
[EN] Purpose & Function : A high-efficiency spatial macro-curvature (geometric variance proxy) measurement module engineered to maintain static compilation integrity across fluid multi-dimensional batch scaling. To shield developers from stubborn tracer crashes...