// // MoEModule.hpp // MNN // // Created by MNN on 2025/05/09. // Copyright © 2018, Alibaba Group Holding Limited // #ifndef MoEModule_hpp #define MoEModule_hpp #include #include "core/Schedule.hpp" namespace MNN { namespace Express { class MoEModule : public Module { public: virtual ~MoEModule() {} // Do nothing virtual std::vector onForward(const std::vector& inputs) override; static MoEModule* create(const Op* op, const std::map& subGraph, std::shared_ptr rtmgr, const Module::Config& config); private: MoEModule(){} Module* clone(CloneContext* ctx) const override; int mNumExperts = 128, mTopK = 8; std::vector> mExperts; std::vector mHiddenStatesList; }; } } #endif /* MoEModule_hpp */