Skip to content

Commit

Permalink
Update big_modeling.md (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
kli-casia authored Sep 18, 2023
1 parent a87c95d commit 629d02c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/usage_guides/big_modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ As a brief example, we will look at using `transformers` and loading in Big Scie
```py
from transformers import AutoModelForSeq2SeqLM

model = AutoModelForSeq2SeqLM("bigscience/T0pp", device_map="auto")
model = AutoModelForSeq2SeqLM.from_pretrained("bigscience/T0pp", device_map="auto")
```

After loading the model in, the initial steps from before to prepare a model have all been done and the model is fully
Expand All @@ -140,11 +140,11 @@ specifying the precision the model is loaded into as well, through the `torch_dt
```py
from transformers import AutoModelForSeq2SeqLM

model = AutoModelForSeq2SeqLM("bigscience/T0pp", device_map="auto", torch_dtype=torch.float16)
model = AutoModelForSeq2SeqLM.from_pretrained("bigscience/T0pp", device_map="auto", torch_dtype=torch.float16)
```

To learn more about this, check out the 🤗 Transformers documentation available [here](https://huggingface.co/docs/transformers/main/en/main_classes/model#large-model-loading).

## Where to go from here

For a much more detailed look at big model inference, be sure to check out the [Conceptual Guide on it](../concept_guides/big_model_inference)
For a much more detailed look at big model inference, be sure to check out the [Conceptual Guide on it](../concept_guides/big_model_inference)

0 comments on commit 629d02c

Please sign in to comment.