Skip to content

将模型的权重量化以后怎么加载 #185

@pc123s

Description

@pc123s

采用int4量化了模型,但是量化以后无法打印原始模型的权重了
(music-generate) (base) pengchuang@287defcbcc36:~/music_generate/rwkv.cpp-master$ /home/pengchuang/miniforge3/envs/music-generate/bin/python /home/pengchuang/music_generate/rwkv.cpp-master/python/test.py
Version: 101, Vocabulary size: 20096, Embedding size: 512, Layers: 29, FP16: True
Loaded emb.weight: shape [20096, 512], dtype <class 'numpy.float16'>
Loaded blocks.0.ln1.weight: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.ln1.bias: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.ln2.weight: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.ln2.bias: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.ln0.weight: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.ln0.bias: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.att.time_decay: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.att.time_first: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.att.time_mix_k: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.att.time_mix_v: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.att.time_mix_r: shape [512], dtype <class 'numpy.float32'>
Loaded blocks.0.att.key.weight: shape [512, 512], dtype <class 'numpy.float16'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions