forked from skyzh/tiny-llm
-
Notifications
You must be signed in to change notification settings - Fork 0
new test_1_week_1_day_1 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
I0-OVI
wants to merge
66
commits into
I0-OVI:main
Choose a base branch
from
skyzh:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Alex Chi <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
* 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]>
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]>
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]>
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]>
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]>
Signed-off-by: Alex Chi Z <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
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]>
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]>
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: Alex Chi Z <[email protected]>
Signed-off-by: Connor1996 <[email protected]>
Signed-off-by: Connor1996 <[email protected]>
Signed-off-by: Connor1996 <[email protected]>
Co-authored-by: Yangchen Ye <[email protected]>
* docs: add instruction to download Qwen2-1.5B model
Signed-off-by: Connor1996 <[email protected]>
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]>
Signed-off-by: KKKZOZ <[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
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.
I just use os library to check whether it is mlx or pytorch and there is a specific function and test for each case.