Universal Z-Rule Runner Architecture (Prototype)

https://github.com/10kseason/uzr

UZR

๊ฐœ์š” (Korean)

๋ชจ๋ธ ํŒŒ์ดํ”„๋ผ์ธ: ์ž…๋ ฅ ๋ฌธ์ž์—ด์€ ๋ฐ”์ดํŠธ ๋‹จ์œ„ ํ† ํฌ๋‚˜์ด์ €๋กœ ์ •๊ทœํ™”๋˜์–ด BOS/EOS ํ† ํฐ๊ณผ ํŒจ๋”ฉ์ด ํฌํ•จ๋œ ์‹œํ€€์Šค๋กœ ๋ณ€ํ™˜๋ฉ๋‹ˆ๋‹ค.ใ€F:uzr/model.pyโ€ L10-L28ใ€‘
ํ‘œํ˜„ ํ•™์Šต๊ธฐ: TinyEncoder ํŠธ๋žœ์Šคํฌ๋จธ๊ฐ€ ํ† ํฐ ์ž„๋ฒ ๋”ฉ๊ณผ ์œ„์น˜ ์ž„๋ฒ ๋”ฉ์„ ๊ฒฐํ•ฉํ•ด ๋ฌธ๋งฅ ํ‘œํ˜„์„ ๋งŒ๋“ค๊ณ , FiLM ๊ณ„์ธต์ด ์–ธ์–ดยท์ถ”๋ก  ์ž ์žฌ ๋ฒกํ„ฐ๋ฅผ ๊ฒฐํ•ฉํ•˜์—ฌ ํ† ํฐ๋ณ„ ๋กœ์ง“์„ ์‚ฐ์ถœํ•ฉ๋‹ˆ๋‹ค.ใ€F:uzr/model.pyโ€ L43-L146ใ€‘
์ž ์žฌ ์ƒํƒœ ์œตํ•ฉ: UZRModel์€ ๊ทœ์น™ ์ถ”๋ก (z_rule), ์‚ฌ๊ณ  ๋ณด์กฐ(z_think), ์–ธ์–ด ์‹๋ณ„์ž ์ž„๋ฒ ๋”ฉ์„ ๊ฒฐํ•ฉํ•ด ๋‹จ์ผ ์กฐ๊ฑด ๋ฒกํ„ฐ๋กœ ํˆฌ์˜ํ•ฉ๋‹ˆ๋‹ค.ใ€F:uzr/model.pyโ€ L62-L145ใ€‘
์••์ถ• ๋ฉ”๋ชจ๋ฆฌ: CompressedMemory๋Š” ํ‰๊ท  ์ž„๋ฒ ๋”ฉ๊ณผ ๋А๋ฆฐ ์ž ์žฌ ๋ฒกํ„ฐ๋ฅผ ์ •๊ทœํ™”๋œ ํ‚ค์™€ ํ•จ๊ป˜ ์ €์žฅํ•˜๊ณ , ์ฝ”์‚ฌ์ธ ์œ ์‚ฌ๋„ ๊ธฐ๋ฐ˜ ๊ฒ€์ƒ‰ ๋ฐ MLP ํ•™์Šต๊ธฐ๋กœ ๋ณต์›๊ฐ’์„ ์ถ”์ •ํ•ฉ๋‹ˆ๋‹ค.ใ€F:uzr/memory.pyโ€ L37-L200ใ€‘ใ€F:uzr/memory.pyโ€ L282-L287ใ€‘
์žฅ๊ธฐ ์ถ”๋ก  ๋ฃจํ”„: ์ถ”๋ก  ์Šคํฌ๋ฆฝํŠธ๋Š” ํƒœ์Šคํฌ ์ƒ˜ํ”Œ๋ง ํ›„ ์ปจํ…์ŠคํŠธ๋ฅผ ์ธ์ฝ”๋”ฉํ•˜๊ณ , ๋ฉ”๋ชจ๋ฆฌ์—์„œ ์ดˆ๊ธฐ z_fast๋ฅผ ๋ฐ›์•„ ๋‚ด๋ถ€ ๊ฒฝ์‚ฌ ํ•˜๊ฐ•์œผ๋กœ ์กฐ์ •ํ•œ ๋’ค ๋А๋ฆฐ ์ƒํƒœ์™€ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค.ใ€F:uzr/infer_longrun.pyโ€ L6-L170ใ€‘
ํƒœ์Šคํฌ ์ƒ์„ฑ๊ธฐ: sample_task๋Š” ์–ธ์–ด๋ณ„ ๊ทœ์น™ ํŒฉํ† ๋ฆฌ๋ฅผ ์กฐํ•ฉํ•ด ์ปจํ…์ŠคํŠธยท์ฟผ๋ฆฌ ์˜ˆ์‹œ์™€ ์„ค๋ช…์„ ๋ฐ˜ํ™˜ํ•˜๋ฉฐ, ์ˆ˜ํ•™ ๋“ฑ ๊ตฌ์กฐํ™”๋œ ์ž…๋ ฅ์„ ์„ ํƒ์ ์œผ๋กœ ํ˜ผํ•ฉํ•ฉ๋‹ˆ๋‹ค.ใ€F:uzr/tasks.pyโ€ L361-L420ใ€‘

Overview (English)

Model pipeline: Input strings are normalized by a byte-level tokenizer that inserts BOS/EOS markers and padding before batching them as tensors.ใ€F:uzr/model.pyโ€ L10-L28ใ€‘
Representation learner: A TinyEncoder transformer fuses token and positional embeddings, while a FiLM layer conditions the sequence states with language and reasoning latents before projecting token logits.ใ€F:uzr/model.pyโ€ L43-L146ใ€‘
Latent fusion: UZRModel merges rule inference (z_rule), thinking support (z_think), and language embeddings into a single control vector via a learned projection.ใ€F:uzr/model.pyโ€ L62-L145ใ€‘
Compressed memory: CompressedMemory stores normalized keys with averaged embeddings and slow latents, serving cosine-similarity retrieval and an auxiliary MLP regressor to reconstruct stored codes.ใ€F:uzr/memory.pyโ€ L37-L200ใ€‘ใ€F:uzr/memory.pyโ€ L282-L287ใ€‘
Long-run inference loop: The inference script samples tasks, encodes contexts, seeds z_fast from memory, refines it with inner gradient steps, then updates the slow state and memory sketch.ใ€F:uzr/infer_longrun.pyโ€ L6-L170ใ€‘
Task generator: sample_task blends language-specific rule factories to emit context/query pairs and human-readable descriptions, optionally injecting structured cases such as arithmetic.ใ€F:uzr/tasks.pyโ€ L361-L420ใ€‘
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including naksyu/UZR