You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/models/transformers.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,11 @@ title: Transformers
12
12
13
13
## Model Initialization
14
14
15
-
To load the model, you can use the `from_transformers` function. It takes 2 arguments:
15
+
To load the model, you can use the `from_transformers` function. It takes 3 arguments:
16
16
17
17
-`model`: a `transformers` model (created with `AutoModelForCausalLM` for instance)
18
18
-`tokenizer_or_processor`: a `transformers` tokenizer (created with `AutoTokenizer` for instance, it must be an instance of either `PreTrainedTokenizer` or `PreTrainedTokenizerFast`)
19
+
-`device_dtype` (optional): the tensor dtype to use for inference. If not provided, the model will use the default dtype.
0 commit comments