Commit Graph

14 Commits

Author SHA1 Message Date
Nicolas Patry 403680f17d
Quantized GGUF style (#1523)
* Metal quantized modifications proposal.

- Add a device param, wherever needed.
- Create new QMetal storage thing that implements QuantizedType.
- Update everywhere needed.

Fix Python.

Fixing examples.

Fix: fmt + clippy + stub.

Moving everything around.

Only missing the actual implems.

Fixing everything + adding dequantized kernels.

More work.

Fixing matmul.

Fmt + Clippy

Some clippy fixes.

Working state.

Q2K Metal -> Bugged (also present in GGML).
Q4K CPU -> Bugged (present previously, new test catch it).
Q5K CPU -> Bugged (present previously).
Q8_1 Both -> Never really implemented it seems
Q8K metal -> Never implemented in metal

Fixing Q2K bug (present in ggml).

* Cleanup.

* Fix the rebase.

* Removing the fences speeds everything up and *is* correct this time...

* Cleanup the fence.

* After rebase.

* Bad code removal.

* Rebase after phi2 merge + fix replit default to CPU.

* Making the CI happy.

* More happy tests.

---------

Co-authored-by: Nicolas Patry <nicolas@Nicolass-MacBook-Pro.local>
2024-01-17 10:27:58 +01:00
Nicolas Patry b4cb982e49
Simplifying our internal cargo dependencies. (#1529) 2024-01-07 12:04:14 +01:00
Laurent Mazare d35f0a1376
Bump the crate version to 0.3.3. (#1490) 2023-12-28 13:38:30 +01:00
Laurent Mazare 94817dac56
Bump the crate version to 0.3.2. (#1452) 2023-12-17 05:34:53 -06:00
Laurent Mazare bfa7c8fc01
Implement the module trait directly for QMatMul. (#1372) 2023-11-25 10:09:45 +00:00
Laurent Mazare a209ce8ceb
Update for 0.3.1. (#1324) 2023-11-11 18:48:52 +00:00
Laurent Mazare dac73edb34
AVX optimized q8k vecdot. (#1024) 2023-10-03 12:10:58 +01:00
Laurent Mazare 089fc3b584
Improve the quantized whisper setup. (#1018)
* Improve the quantized whisper setup.

* Fix the config file paths.

* Use the standard matmul where possible.
2023-10-02 17:17:46 +01:00
Laurent Mazare 263a172202
Improve the testing of the optimized quantized vec-dot ops (#1016)
* Expose the unopt functions for testing.

* Better testing of the optimized quantized computations.
2023-10-02 09:50:43 +01:00
Laurent Mazare 096dee7073
Bump the version to 0.3.0. (#1014)
* Bump the version to 0.3.0.

* Changelog update.
2023-10-01 13:51:57 +01:00
Laurent Mazare 4e55aaa51f
Simd128 version of the q2k-q8k vecdot product. (#1011)
* Sketch the simd128 version of q2k vecdot.

* Use a single accumulator.

* Simdify the q2k-q8k vecdot product.

* Cosmetic change.
2023-09-30 20:12:41 +01:00
Laurent Mazare 8a49e01b9d
Add the remaining quantized tests to the wasm suite. (#980) 2023-09-28 08:42:56 +01:00
Laurent Mazare 9cb110c44c
Sketch a simd128 optimized q4k vecdot. (#977)
* Sketch a simd128 optimized q4k vecdot.

* Simdify.

* More quantization optimizations.

* Again more simdification.

* Simdify the splitting loop.
2023-09-27 20:19:38 +01:00
Laurent Mazare 667f01c173
Simd128 vec-dot for q4_0. (#974)
* Simd128 vec-dot for q4_0.

* Bugfix.

* Add wasm tests.

* Bugfix for the q40 vecdot.

* More quantization tests.
2023-09-27 14:15:30 +01:00