Skip to content

Conversation

@I0-OVI
Copy link
Owner

@I0-OVI I0-OVI commented Jul 23, 2025

I just use os library to check whether it is mlx or pytorch and there is a specific function and test for each case.

Andy1314Chen and others added 20 commits June 13, 2025 17:19
* test:add a test case to cover week_1_day_3_task3

Closes: #23
Signed-off-by: Jiawei Zhao <[email protected]>

* fmt

Signed-off-by: Alex Chi Z <[email protected]>

---------

Signed-off-by: Jiawei Zhao <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
Co-authored-by: Alex Chi Z <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
Add KV cache module imports to both tiny_llm and tiny_llm_ref packages
to enable KV cache functionality. Include comprehensive test suite for
week 2 day 1 covering embedding operations, model inference with KV
cache, and sequential token generation with offset support.

- Add KV cache imports to __init__.py files
- Create test_week_2_day_1.py with task 2-4 test coverage
- Support multiple Qwen2 model variants (0.5B, 1.5B, 7B)
- Include embedding call and as_linear functionality tests
- Add sequential generation tests with proper cache management
Signed-off-by: Alex Chi Z <[email protected]>
@I0-OVI I0-OVI closed this Aug 8, 2025
@I0-OVI I0-OVI reopened this Aug 8, 2025
skyzh and others added 8 commits August 9, 2025 16:01
Signed-off-by: Alex Chi Z <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
Extract string replacement operation outside f-string expression
to avoid backslash in f-string expression part, which is not
allowed in Python syntax.

- Move .replace('\n', ' ') operation to separate variable
- Improves code readability and fixes SyntaxError
Signed-off-by: Alex Chi Z <[email protected]>
58191554 and others added 30 commits August 21, 2025 16:33
Refer to another commit cause you can't find RMSNorm impl in the current mlx-llm repo (it's replaced by mlx fast impl).
* Possible typo in week1-01-attention

Hello, was going through the book! I'm not 100% sure of this, but after going through the tests for day1-task2, it looks like the w_qkv matrices and w_o matrix have their shape reversed.

I confirmed by checking the mlx.nn.layers.linear.Linear weight, which is of shape `[Output, Input]`. Since w_qkv's output is HxD and input is E, the shape should be `[H x D, E]`.

* Oops fix another typo
* Revert "fix: Use non-traditional RoPE in Qwen2 test case. (#56)"

This reverts commit bf3383d.

* Update week1-03-gqa.md with RoPE note and test command

Added note about using non-traditional RoPE and testing command.

---------

Co-authored-by: Alex Chi Z. <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
Resolves #50, applies the patch from there and updates pyproject / lockfile to specify newer version of mlx.
* Add CI for reference solution / building extensions

* Adjust tests to run build-ext-ref before testing

* Add sshx for debugging

* Fix nanobind in CMake

* Change when the workflow runs
This test requires the latest version of mlx 0.29.1, since they just merged support for this in mlx a week ago: ml-explore/mlx#2564

I verified that the other tests still pass with the version upgrade.
* Add tests for week 2, day 6 - continuous batching

* Download model weights in GitHub Actions
* add speculative decoding

Signed-off-by: Alex Chi Z <[email protected]>

* update readme

Signed-off-by: Alex Chi Z <[email protected]>

---------

Signed-off-by: Alex Chi Z <[email protected]>
Signed-off-by: Connor1996 <[email protected]>
Signed-off-by: Connor1996 <[email protected]>
* docs: add instruction to download Qwen2-1.5B model
Extract newline character to a variable to avoid backslash in f-string expression part.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
- Add complete quantized_matmul_impl_typed template function for CPU, which support float16, float32, and bfloat16 data types
- Add float32 test cases for quantized_matmul
- Adjust float32 tolerance in test utils for better precision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.