Sariel00's picture
Publish Ling-3.0-tiny RKNN engine and model
3fd1a35 verified
Raw History Blame Contribute Delete
668 Bytes
#pragma once
#include "ling3/gdn_step.h"
#include "ling3/model_package.h"
#include "ling3/w4_linear.h"
#include <array>
#include <cstdint>
#include <memory>
#include <span>
namespace ling3 {
struct Layer0Timings {
double attention_ms = 0.0;
double dense_ffn_ms = 0.0;
double total_ms = 0.0;
};
class Layer0 {
public:
explicit Layer0(const ModelPackage & package);
~Layer0();
Layer0(const Layer0 &) = delete;
Layer0 & operator=(const Layer0 &) = delete;
void Reset();
Layer0Timings DecodeToken(std::uint32_t token, std::span<float> output);
private:
struct Impl;
std::unique_ptr<Impl> impl_;
};
} // namespace ling3