Download src/mla_npu.h from Sariel00/Ling-3.0-tiny-RKNN: direct link, hf CLI and curl.
- Browser
- Download file 703 Bytes
-
https://huggingface.co/Sariel00/Ling-3.0-tiny-RKNN/resolve/main/src/mla_npu.h
- Command line
-
hf download hf://Sariel00/Ling-3.0-tiny-RKNN/src/mla_npu.h
-
curl -L -o mla_npu.h https://huggingface.co/Sariel00/Ling-3.0-tiny-RKNN/resolve/main/src/mla_npu.h
703 Bytes
| namespace ling3 { | |
| // One workspace per decoder, shared by all six MLA layers. No persistent KV: | |
| // checkpoint/rewind semantics continue to belong to the decoder's BF16 cache. | |
| class MlaNpu { | |
| public: | |
| MlaNpu(); | |
| ~MlaNpu(); | |
| void Prepare(std::size_t rows); | |
| bool Run(std::span<const float> q, std::span<const std::uint16_t> k, | |
| std::span<const std::uint16_t> v, std::size_t rows, std::size_t history, | |
| std::span<float> output); | |
| void CpuCall(); | |
| MlaBackendStats Stats() const; | |
| private: | |
| struct Impl; | |
| std::unique_ptr<Impl> impl_; | |
| }; | |
| } | |