Lightning-AI / litgpt

Pretrain, finetune, deploy 20+ LLMs on your own data. Uses state-of-the-art techniques: flash attention, FSDP, 4-bit, LoRA, and more.
https://lightning.ai
Apache License 2.0
6.85k stars 726 forks source link

Phi (tests): create a class directly from HF #1343

Closed Andrei-Aksionov closed 3 weeks ago

Andrei-Aksionov commented 3 weeks ago

Hey there 👋

Previously for Phi models (both 1.5 and 2) in the HF repo there were modeling_*.py files and we had to download them and instantiate a reference class from the file (to tests correctness of the output between LitGPT and HF). Now we can do this directly from transformers + for Phi-1.5 there is no longer modeling file available.

Fixes failing tests.