Skip to content
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

How to use the content of the notice #2

Open
Evfidiw opened this issue May 9, 2024 · 1 comment
Open

How to use the content of the notice #2

Evfidiw opened this issue May 9, 2024 · 1 comment

Comments

@Evfidiw
Copy link

Evfidiw commented May 9, 2024

Thanks for your interesting work.
Could you provide more detailed guidance on the content of Notice? Should I change LlamaForCausalLM to AutoModel on line163 in finetune_kg.py? But this will give the error.
In addition, could you please provide the memory of your A800? I cannot run on a GPU with 48GB of memory.

@luoxindi
Copy link
Collaborator

You can modify the code to:
'''
model = AutoModelForCausalLM.from_pretrained(
base_model,
#load_in_8bit=True,
torch_dtype=torch.float32,
device_map="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
'''
And comment out the code: shutil.copyfile(base_model...)
The memory of A800 is about 80G. And I recommend that you adjust the mini_batch_size to 2 or 1. But this may affects the final results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants