File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 192192
193193# COMMAND ----------
194194
195- import torch
196-
197195# Examples from https://www.databricks.com/blog/2023/03/24/hello-dolly-democratizing-magic-chatgpt-open-models.html
198196instructions = [
199197 "Write a love letter to Edgar Allan Poe." ,
204202]
205203
206204# set some additional pipeline args
205+ pipeline_kwargs = {'torch_dtype' : "auto" }
207206if gpu_family == "v100" :
208- pipeline_kwargs = { 'torch_dtype' : torch . float16 }
209- else :
210- pipeline_kwargs = {}
207+ pipeline_kwargs [ 'torch_dtype' ] = " float16"
208+ elif gpu_family == "a10" or gpu_family == "a100" :
209+ pipeline_kwargs [ 'torch_dtype' ] = "bfloat16"
211210
212211# Use the model to generate responses for each of the instructions above.
213212for instruction in instructions :
You can’t perform that action at this time.
0 commit comments