# Save PEFT trained Huggingface models using RAY

**URL:** <https://discuss.ray.io/t/save-peft-trained-huggingface-models-using-ray/11900>\
**Category:** Uncategorized\
**Created:** [August 23, 2023, 5:33am UTC](https://discuss.ray.io/t/save-peft-trained-huggingface-models-using-ray/11900 "2023-08-23T05:33:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumanth\_Pulugu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sumanth_pulugu/32/4622_2.png) [@Sumanth\_Pulugu](https://discuss.ray.io/u/Sumanth_Pulugu)\
**Post date:** [August 23, 2023, 5:33am UTC](https://discuss.ray.io/t/save-peft-trained-huggingface-models-using-ray/11900/1 "2023-08-23T05:33:11Z")

</div>

Hi Everyone,  
i’m trying to finetune an LLM using huggingface trainer by implementing PEFT technique. Training is progressing quciker as expected, but when once the training is completed when i’m trying to save the model using results.checkpoint it is saving the entire large model. i want to save the adaptaer models.  
can anyone help me on how i can train LLM by implementing PEFT using huggingface trainer in RAY  
Thanks

---

<div class="post-metadata">

**Author:** ![Jules\_Damji](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jules_damji/32/4058_2.png) [@Jules\_Damji](https://discuss.ray.io/u/Jules_Damji)\
**Post date:** [August 23, 2023, 3:55pm UTC](https://discuss.ray.io/t/save-peft-trained-huggingface-models-using-ray/11900/2 "2023-08-23T15:55:05Z")

</div>

@Sumanth_Pulugu Here are couple of examples of fine-tuning an LLM model with Ray.

1. [GPT-J-6B Fine-Tuning with Ray AIR and DeepSpeed — Ray 2.6.1](https://docs.ray.io/en/latest/ray-air/examples/gptj_deepspeed_fine_tuning.html)
2. [https://github.com/ray-project/ray/tree/workspace\_templates\_2.6.1/doc/source/templates/04\_finetuning\_llms\_with\_deepspeed](https://github.com/ray-project/ray/tree/workspace_templates_2.6.1/doc/source/templates/04_finetuning_llms_with_deepspeed)
