Skip to content

hepingpeace/Llama2.0_inf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Llama2.0_inf

this is code from

https://www.youtube.com/watch?v=oM4VmoabDAI

I follow the video and code this repo

You can download the Llama model by following this link.

https://github.com/meta-llama/llama

when I follow the video I have this issue in these code

        if load_model:
            # The only unmatched key in the checkpoint is rope.freqs. Remove it
            del checkpoint['rope.freqs']
            model.load_state_dict(checkpoint, strict=True)
            print(f"Loaded state dict in {time.time() - prev_time:.2f}s")

You can try the original code first. If that doesn't work, you can try this one.

checkpoint_filtered = {k: v for k, v in checkpoint.items() if not k.endswith(".rope.freqs")}
model.load_state_dict(checkpoint_filtered, strict=True)

Good Luck!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages