# Inference, checkpoint

**URL:** <https://discuss.huggingface.co/t/inference-checkpoint/64637>\
**Category:** Beginners\
**Created:** [December 5, 2023, 10:24am UTC](https://discuss.huggingface.co/t/inference-checkpoint/64637 "2023-12-05T10:24:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuperOvni](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@SuperOvni](https://discuss.huggingface.co/u/SuperOvni)\
**Post date:** [December 5, 2023, 10:24am UTC](https://discuss.huggingface.co/t/inference-checkpoint/64637/1 "2023-12-05T10:24:46Z")

</div>

Hello,  
I’m in the process of fine-tuning a model with peft and LORA, is it possible to load the first checkpoint (knowing that the training is not finished) to make inference on it?

Checkpoint-1 contains :

- adapter\_config.json
- adapter\_model.safetensors
- optimizer.pt README.md
- rng\_state.pth
- scheduler.pt
- special\_tokens\_map.json
- tokenizer\_config.json
- tokenizer.model
- trainer\_state.json
- training\_args.bin

If i try :  
model =AutoModelForCausalLM.from\_pretrained(BASE\_MODEL\_PATH)  
ft\_model = PeftModel.from\_pretrained(model,checkpoint\_path)  
Return :  
lib/python3.10/site-packages/safetensors/torch.py", line 308, in load\_file  
with safe\_open(filename, framework=“pt”, device=device) as f:  
safetensors\_rust.SafetensorError: Error while deserializing header: InvalidHeaderDeserialization

Thank’s
