Update llama.py
This commit is contained in:
parent
82520f5e4c
commit
4773950b65
1 changed files with 5 additions and 0 deletions
|
|
@ -1830,6 +1830,11 @@ class FastLlamaModel:
|
|||
|
||||
@staticmethod
|
||||
def for_inference(model):
|
||||
if model.config.model_type == "qwen2":
|
||||
FastLlamaModel.for_training(model)
|
||||
return
|
||||
pass
|
||||
|
||||
internal_model = model
|
||||
internal_model.gradient_checkpointing = False
|
||||
internal_model.training = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue