GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Phase 1: a working f32 forward pass (generates coherent text) by codewithfourtix · Pull Request #2 · codewithfourtix/ember Conversation
Owner
Implements the whole Phase 1 pipeline — a hand-written transformer that loads a real Qwen2.5 model and generates text. What landed
VerifiedThe NumPy oracle (identical math to the Rust) run against Qwen2.5-0.5B:
Coherent, on-topic output confirms every convention is correct — RoPE pairing, GQA head mapping, tied embeddings, biases. Next: Phase 2 (quantization + benchmarks).
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsRow-major matrix-vector product with each output row computed in parallel, plus the in-place residual/bias adds. RoPE uses the HuggingFace rotate-half convention (dim j pairs with j+head_dim/2) that Llama/Qwen weights expect. Each query head attends over the causal KV cache using its shared kv head (group = n_heads / n_kv), scaled by 1/sqrt(head_dim). Greedy arg-max plus top-p with a small dependency-free xorshift RNG. default-features = false selects the pure-Rust regex path, so no C/C++ toolchain is needed to compile the tokenizer. Loads every tensor (bf16/f16/f32 -> f32), handles Qwen's tied LM head and QKV biases, and runs embed -> N x (RMSNorm -> GQA -> RMSNorm -> SwiGLU) -> norm -> LM head for one decode step. Encodes the prompt, prefills the KV cache, then samples/decodes/streams tokens until EOS or the token budget, reporting tokens/sec. A standalone NumPy mirror of the exact algorithm. Verified against Qwen2.5-0.5B: 'The capital of France is Paris. It is the largest city in Europe and the third'. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewThis PR completes the Phase 1 (correctness-first) pipeline for Changes:
Reviewed changesCopilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments. Show a summary per file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
26
to
+28
Comment on lines
+96
to
+100
Comment on lines
19
to
+22
Comment on lines
+171
to
+187
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |