meta-llama / codellama

Inference code for CodeLlama models
Other
15.42k stars 1.79k forks source link

Issue with loading codellama models outside codellama directory #161

Open selmi2 opened 8 months ago

selmi2 commented 8 months ago

When I try to run python script, I get this error :

ypeError                                 Traceback (most recent call last)
Cell In[6], line 10
      6 max_batch_size = 4
      7 max_gen_len: Optional[int] = None
---> 10 generator = Llama.build(
     11         ckpt_dir=ckpt_dir,
     12         tokenizer_path=tokenizer_path,
     13         max_seq_len=max_seq_len,
     14         max_batch_size=max_batch_size,
     15     )

File ~/llama/llama/generation.py:111, in Llama.build(ckpt_dir, tokenizer_path, max_seq_len, max_batch_size, model_parallel_size, seed)
    108 with open(Path(ckpt_dir) / "params.json", "r") as f:
    109     params = json.loads(f.read())
--> 111 model_args: ModelArgs = ModelArgs(
    112     max_seq_len=max_seq_len,
    113     max_batch_size=max_batch_size,
    114     **params,
    115 )
    116 tokenizer = Tokenizer(model_path=tokenizer_path)
    117 model_args.vocab_size = tokenizer.n_words

TypeError: __init__() got an unexpected keyword argument 'rope_theta'
sukeesh commented 2 months ago

+1 I am also seeing this error

niginajon commented 2 months ago

+1