tinygrad/test/unit
George Hotz 321ab943b2
qwen model is working (#13690)
* qwen model is mostly working

* add Q4_K quantization support to GGUF parser, add qwen3:1.7b model

- Add Q4_K (type 12) dequantization in nn/state.py
- Add qwen3:1.7b model using Q4_K_M quantization (smaller than Q8_0)
- Make bos_token_id optional for models like Qwen3 that don't have it
- Fix line length issues and add preset parameter to SimpleTokenizer

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* smaller diff

* test dequant

* half split

* better

* simple tok

* mock token

* polish

* better

* fix

* replace

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 18:00:34 -04:00
..
__init__.py more test cleanups (#2631) 2023-12-05 16:17:57 -08:00
test_allreduce.py minimal mstack pr to fix allreduce (#10649) 2025-06-05 15:14:53 -07:00
test_attention.py fast tinygrad.apps.llm (#13685) 2025-12-14 21:05:21 -05:00
test_autogen.py fix anonymous struct fields (#13610) 2025-12-07 12:56:38 -05:00
test_conv.py hotfix: disable flaky test 2025-11-13 06:19:28 -08:00
test_device.py device: respect compiler ContextVars (#13523) 2025-12-02 14:42:04 +03:00
test_disk_cache.py helpers.diskcache_clear (#4436) 2024-05-05 14:19:01 -04:00
test_disk_tensor.py feat: assert on bufferview math (#12772) 2025-10-17 14:20:08 -07:00
test_dtype.py nbytes should raise an exception when size is unlimited (#11928) 2025-09-03 07:06:20 -07:00
test_dtype_spec.py skip test_mean_half_precision_overflow (#12331) 2025-09-29 05:15:04 -04:00
test_elf.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_gguf.py add Q4_K GGUF quantization support (#13700) 2025-12-15 10:17:56 -05:00
test_gradient.py use assign in Tensor.backward (#13674) 2025-12-13 22:43:06 -05:00
test_graph_rewrite.py add kernel spec (#12911) 2025-10-25 11:49:20 +08:00
test_hashing.py variable bs keccak (#10731) 2025-10-23 14:10:21 -07:00
test_helpers.py fix caching for fetch (#13544) 2025-12-03 14:34:14 +03:00
test_indexing.py fix: add __delitem__ to Tensor with proper TypeError (#13561) 2025-12-04 00:53:08 -08:00
test_linalg.py shared_codegen_spec and fix index spec (#12967) 2025-10-29 09:14:11 +01:00
test_linearizer_rewrite.py early reduce simplify (#12046) 2025-09-10 21:02:46 +08:00
test_llm_server.py qwen model is working (#13690) 2025-12-15 18:00:34 -04:00
test_llm_tokenizer.py clean up the LLM tokenizer (#12653) 2025-10-14 14:22:01 +08:00
test_masked_st.py move high level tests to unit (#10760) 2025-06-10 12:55:44 -04:00
test_microbenchmarks.py improve microbenchmarks (#13492) 2025-11-29 10:15:22 -08:00
test_mnist_dataset.py move high level tests to unit (#10760) 2025-06-10 12:55:44 -04:00
test_pattern_matcher.py SPEC=2 is full spec, SPEC=1 is default (#12910) 2025-10-25 11:10:43 +08:00
test_rearrange_einops.py move high level tests to unit (#10760) 2025-06-10 12:55:44 -04:00
test_rewrite_bottom_up_gate.py Move Ops.SPECIAL arg to src (#11918) 2025-09-04 09:31:44 +02:00
test_rewrite_map.py Revert "UOp.factor and add chain sorting (#12413)" (#12492) 2025-10-08 03:20:23 +02:00
test_schedule_cache.py schedule: cache unbinds for consistent cache keys (#13664) 2025-12-12 17:27:42 -05:00
test_shm_tensor.py add needs_second_gpu decorator (#13543) 2025-12-02 19:08:23 -08:00
test_simplify_valid_idx.py add test that shows the validhack regression with bad rewrite order (#13411) 2025-11-21 13:48:30 -05:00
test_symbolic_failures.py symbolic fuzz failure (#13367) 2025-11-19 14:21:08 -08:00
test_symbolic_shapetracker.py delete the ShapeTracker (#12720) 2025-10-16 15:36:22 +08:00
test_tar.py accept filename decorator [pr] (#8049) 2024-12-05 11:40:59 +08:00
test_tensor_data.py test_tesnor_data to unit/ (#12013) 2025-09-04 19:58:27 -04:00
test_tensor_io.py tar_extract with Tensors (#7853) 2024-12-04 17:03:19 +08:00
test_tensor_uop_representation.py replace mop arg with vectorized index (#12695) 2025-10-15 20:50:06 +08:00
test_tinyfs.py remove kernelize to prepare for refactors (#13463) 2025-11-26 14:18:50 -08:00
test_tqdm.py symbolic fuzz failure (#13367) 2025-11-19 14:21:08 -08:00
test_transcendental_helpers.py add loads at the end (#12988) 2025-10-30 10:42:19 +08:00
test_uop_resolve.py move files into uop dir (#10399) 2025-05-18 11:38:28 -07:00
test_uop_symbolic.py minor test_uop_symbolic updates (#13551) 2025-12-03 13:17:44 -05:00
test_uop_vmin_vmax.py limit AND const min max to ints [pr] (#12918) 2025-10-25 16:07:52 -04:00
test_upat_compile.py SPEC=2 is full spec, SPEC=1 is default (#12910) 2025-10-25 11:10:43 +08:00
test_viz.py tracing: use u32 for buffer args encoding (#13472) 2025-11-28 00:19:51 +08:00
test_winograd.py combine pm_drop_and_clauses (#12660) 2025-10-14 10:09:41 +02:00