returnn.frontend.conversions.hf_llama
¶
Import the parameters from the HuggingFace Llama model (PyTorch).
- returnn.frontend.conversions.hf_llama.import_params_hf_llama_to_rf_transformer_decoder(model_hf: LlamaModel | LlamaForCausalLM, model_rf: TransformerDecoder)[source]¶
Import params from HF Llama model to RF
TransformerDecoder
.
- returnn.frontend.conversions.hf_llama.import_params_hf_llama_decoder_layer_to_rf(model_hf: LlamaDecoderLayer, model_rf: TransformerDecoderLayer)[source]¶
Import the parameters from the HF Llama decoder layer.
- returnn.frontend.conversions.hf_llama.import_params_hf_llama_mlp_to_rf_feed_forward_gated(model_hf: LlamaMLP, model_rf: FeedForwardGated)[source]¶
Import the parameters from the HF Llama MLP module.