THUDM / SwissArmyTransformer

SwissArmyTransformer is a flexible and powerful library to develop your own Transformer variants.
https://THUDM.github.io/SwissArmyTransformer
Apache License 2.0
951 stars 90 forks source link

How to load and initialize llama2 models downloaded from Huggingface #143

Closed microhu closed 7 months ago

microhu commented 10 months ago

Does the sat lib support. llama2? I found the parameters are not initilalized when using lamma class to load the vicuna-7b-1.5 model by using from_pretrained func. Could you kiindly give an. example of using sat to load and init the official llama2 models ?

1049451037 commented 10 months ago

We support llama2 in sat. But I haven't uploaded the weights to cloud. You can use the scripts here to transform the model downloaded from huggingface to sat format: https://github.com/THUDM/SwissArmyTransformer/tree/main/examples/llama

microhu commented 10 months ago

We support llama2 in sat. But I haven't uploaded the weights to cloud. You can use the scripts here to transform the model downloaded from huggingface to sat format: https://github.com/THUDM/SwissArmyTransformer/tree/main/examples/llama

got, thanks. I will try