Skip to content

Commit

Permalink
[doc] update example codes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecovlee committed Jul 30, 2024
1 parent 71eb130 commit 0ca4aae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ pip3 install mixlora
Then you can load MixLoRA adapter into a pre-trained model with following codes:

```python
from transformers import AutoModelForCausalLM
from mixlora import MixLoraModel
from mixlora import MixLoraModelForCausalLM
from transformers import AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(...)
model = MixLoraModel.from_pretrained(model, name_or_path_to_the_adapter, ...)
model, config = MixLoraModelForCausalLM.from_pretrained(name_or_path_to_the_adapter, ...)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
```

## Reproduction Instruction
Expand Down

0 comments on commit 0ca4aae

Please sign in to comment.