File size: 380 Bytes
887c99e
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12

from transformers.models.llama.modeling_llama import LlamaForCausalLM, LlamaConfig

class CustomLlamaForCausalLM(LlamaForCausalLM):
    def __init__(self, config: LlamaConfig):
        super().__init__(config)
        # Hooks o capas personalizadas

    def forward(self, *args, **kwargs):
        # Ajustes pre/post procesamiento
        return super().forward(*args, **kwargs)