• Ceng23333's avatar
    feat: implement neural network module system with PyTorch-like API · 69c1c352
    Ceng23333 authored
    - Implement core modules: Linear, Embedding, RMSNorm
    - Add PyTorch-like macros for module and parameter definition
      - INFINICORE_NN_MODULE for single module declaration
      - INFINICORE_NN_MODULE_VEC for module vectors
      - INFINICORE_NN_PARAMETER for parameter declaration
      - Corresponding INIT macros for initialization
    - Implement hierarchical module system with dynamic path generation
    - Add state_dict() and load_state_dict() support
    - Refactor module design: protected registration methods, removed path_ member
    - Add comprehensive test suite including TinyLlama integration
    - All parameters are protected with public accessors
    69c1c352
test.lua 3.03 KB