bigscience-workshop / petals

🌸 Run LLMs at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading
https://petals.dev
MIT License
8.89k stars 489 forks source link

Add position_ids argument to DistributedFalconModel #525

Closed mryab closed 9 months ago

mryab commented 9 months ago

In https://github.com/huggingface/transformers/commit/a796f7eea6c86b54671a6f522cebbe41f630bb62, Falcon started supporting the position_ids argument and passing it to the model. The current code for DistributedFalconModel.forward does not handle this argument, which results in errors when running tests. This PR fixes the problem by handling position_ids similarly to the LLaMA model.