-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors installing: AttributeError: 'str' object has no attribute '_name_or_path' #4
Comments
FYI of how I am trying to import the code: Run in terminal to get your code from git and local import it:
Edit the function in Then in a local script I can run: from models import load_model, load_tokenizer
tokenizer = load_tokenizer()
model = load_model('abacusai/Giraffe-v2-13b-32k', scale=8) but I'm getting memory error right now after succesfully downloading |
@mattdeeperinsights just confirming that what you posted works for me. from models import load_model, load_tokenizer
tokenizer = load_tokenizer()
model = load_model('abacusai/Giraffe-v2-13b-32k', scale=8)
model.to('cuda')
prompt = "Question: What is 2 + 2? Answer: "
inputs = tokenizer(prompt, return_tensors="pt").to('cuda')
generate_ids = model.generate(inputs.input_ids, max_new_tokens=50)[0]
output_str = tokenizer.batch_decode([generate_ids], skip_special_tokens=True)[0] Seeing 38GB VRAM usage. |
@sshh12 good to hear! Can you confirm that it works for long contexts up to 32,000 tokens? |
Good question -- looks like it doesn't on the A100, tested w/23k tokens:
|
Thanks for this, looking forward to getting stuck in, there's just some teething problems to get it all installed.
Issues:
...
I needed to run
pip install sentencepiece
so I think you need to update yourrequirements.txt
to include that.I had to update this line to:
i.e. from
AutoModelForCausalLM.from_config
toAutoModelForCausalLM.from_pretrained
because otherwise it tries to runbase_model_path._name_or_path
i.e.'abacusai/Giraffe-v2-13b-32k'._name_or_path
Also, I think that this line is an error because
delta_model
is not defined asdelta_model_path=None
by default.Maybe the function should be updated to reflect that:
The text was updated successfully, but these errors were encountered: