I ammmm tierdd
i tried a billionn things over the last 8 hours i just cant seem to understand why gemma4 doesnt want to workkkkk
I dont have much to write in this devlog, other than, i am not gonna implement gemma arch for now
I ammmm tierdd
i tried a billionn things over the last 8 hours i just cant seem to understand why gemma4 doesnt want to workkkkk
I dont have much to write in this devlog, other than, i am not gonna implement gemma arch for now
I discovered that in triton_kernels.py, the tl.dot_scaled call inside _mxfp_lowbit_selected_tensorcore_matvec_kernel (and the mxfp4 variant) had fast_math=True. The fast_math option drops critical precision bits during accumulator addition which was causing the MoE kernels to completely obliterate the trajectory. I disabled it globally using fast_math=False, and this instantly restored our cosine similarity to a perfect 1.000000 over the entire benchmark trajectory.
packed_expert_q1_layers="0:24": All 24 layers of MoE experts are now tightly packed into 1-bit Q1 structures, shrinking the expert memory footprint down to just 2.38 GB (from 9.52 GB).dense_int4_layers="all": Shrunk the non-expert dense projection weights (Q, K, V, O) into INT4, dropping their footprint from ~1.1 GB to ~0.27 GB.successfully builds the fully fused cuda_graphs execution path, accelerating generation from a crawl to 97.87 tok/s ON gpt-oss-20b. I believe ill be moving to dense models just about now
All these issues took SOOO many tests to find
What I’ve Done:
reached around 65tk/s on gpt-oss-20b, constantly improvising MoE performance, next ima lock in for dense models but for now on MoE
Implemented a huge list of fixes
Lazy page-ID tensor resolution after quantization
Storage-alias-aware VRAM accounting
Correct affine INT4 partial-group quantization
KV sequence continuity checks
Free-page geometry invalidation
Canonical LM-head bias and final-softcap handling
Certified shortlist logic with exact fallback
Gemma-style attention scaling/softcap fixes
Removal of hot-path CUDA scalar tensor allocations
Device normalization for “cuda”, “cuda:N”, and torch.device
Profile separation has been reconnected and different profiles select different kernels.
Paged KV storage exists through SlabbedKVCache.
A prior paged-attention slowdown was caused by GPU synchronization from .item() calls in SlabbedKVCache.append(), not by paged addressing itself.
Logical page ownership is now tracked CPU-side to avoid those synchronizations.
Paged attention has measured approximately:
Well i said that i would stop working on this project last devlog, butttt, i just saw this https://github.com/random-unknown-username/Thintensor/issues/1
Someone tried thintensor on a 128gb unified ram DGX spark, ANDDDDD now i wanna make it good enough like so its a finished thing
the website is more complete now
DevLog-3
Placement done, few things-
Devlog-2
Completed the SoC design, now on to placement, a few things-
Devlog-1:
Making the canva for video games!!!
I wanted this engine to run natively in the browser without massive downloads, so I chose:
React + Vite for the frontend UI and state management.
Three.js & React-Three-Fiber (R3F) for the 3D rendering pipeline.
Cannon-es (@react-three/cannon) for rigid-body physics.
Zustand for lightweight, blazing-fast state management.
React Flow (@xyflow/react) for the Visual Scripting node editor.
Most React apps map data to UI components linearly, but game engines need an Entity-Component System (ECS) to handle hundreds of objects dynamically. I built a custom ECS using Zustand.
// The core engine state powering the ECS
interface EngineState {
entities: Record<string, Entity>;
addEntity: (name: string) => string;
addComponent: (entityId: string, componentType: ComponentType) => void;
updateComponent: (entityId: string, componentType: ComponentType, data: any) => void;
}
This allows the engine’s Outliner and Inspector panels to dynamically edit any object in the scene in real-time, just like Unity or Unreal.
The coolest feature I got working today was the Visual Script Editor. I used React Flow to let users connect nodes (like “On Update” -> “Move To Player”). But how does a node graph become executable game?
I wrote a compiler that traverses the node graph and translates it into a raw JavaScript string. This string is saved into the entity’s script component and executed dynamically in the game loop using a
Function constructor!
// A snippet of the compiler output injected into the game loop
} else if (node.data.label === 'Enemy: Move To Player') {
output += `
if (api.velocity) {
const toPlayer = camera.position.clone().sub(mesh.position);
toPlayer.y = 0;
toPlayer.normalize();
api.velocity.set(toPlayer.x * 4, -1, toPlayer.z * 4);
}
`;
}
The biggest hurdle today was the physics loop. Initially, the enemy tracking script updated the Zustand state every frame. With 15 enemies running at 60fps, it was triggering 900 React state updates a second, completely freezing the browser!
The novel solution for this was bypassing React’s render lifecycle entirely for physics. Instead of updating the state.entities transform data, the compiled scripts now directly tap into the raw Cannon-es physics
API (api.velocity.set()), mutating the physics hull natively. The performance skyrocketed from a frozen screen to a buttery smooth 60fps.
Devlog-1
Made the Power circuit with 3 JW5211 ICs each do-
Required for the F1C100s from allwinner!
a small linux capable SoC
Also added a SPI flash and some status LEDs and stuff
Final devlog:
I would be moving from this project to other cool stuff i have in mind, the final benchmarks i got and everything, is pushed, had to do a lot of improvements to get bigger models running just as good as small ones
I know there can be a lot of other optmizations, but maybe a few months later ill come back to this, but for now, its gonna stay as is.
this was originally supposed to be shipped to clubsite ysws but that is unfortunately no longer active, so I am just adding it here
A few cool things in the website-
I figured I’ll just add the time i spent on stardance because the older clubsite ysws is inactive now
This devlog retains the apples-to-apples GPT-OSS control plus fresh Qwen3.5-9B, Llama 3.2 11B text-path, OpenReasoning-Nemotron-14B, and Phi-4
A LOT of optimizations were done to achive this results and 100s of benchmarks in different profiles and stuff, to get to this final table
Worked over a LOT of stuff, like doing apples to apples comparisions of models such as LLama 11b vision instruct, So over time I fixed a lot of stuff
added a new profile, that quants and quants and quants all layers till the model fits your VRAM, it doesnt care if the model is 20gb in weigths and you have a 8gb vram, it will quant and make it fit
So testing this autofit profile on LLama 11b vision instruct, heres what i found
it hit a cosine of 0.939758 and around 24tk/s on a 200 token test
Similarly i tested ollama Llama 11b vision instruct with q4_k_m quant, it got a cosine close to 0.720495 i would say it would be more closer to 0.8 because this cosine was for only top 20 logprobes that ollama exposes
This was done on
8gb vram rtx 5050 laptop
32gb ddr 5
ryzen 7 250
arch linux
and the comparision is apples to apples because the thinruntime also quanted the model aggressively
When running inference/benchmarks on unquantized models (like Qwen3.5-9B) using the Triton backend on laptop GPUs (e.g., RTX 5050), the runtime encountered two asynchronous CUDA faults:
• cudaErrorIllegalAddress (Illegal memory access) during cache eviction.
• device-side assert triggered ( indexSelectSmallIndex assertion failed) during embedding vocabulary lookups.
To prevent resource starvation, we modified Triton’s launching configuration in triton_kernels.py:
I am currently running the final profiles ( max-performance and max-max-perf ). Let me check on the status!
https://www.reddit.com/r/LocalLLM/comments/1uqr1o3/i_made_a_llm_storage_format_that_makes_llms_run/
Got a lot of feedback, gonna try to work over it over the next few weeks