File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 77
88# Disclaimer
99
10- Before you can use the model go to ` hf.co/bigcode/starcoder ` and accept the agreement.
10+ Before you can use the model go to ` hf.co/bigcode/starcoder ` and accept the agreement. And make sure you are logged into the Hugging Face hub with:
11+ ``` bash
12+ huggingface-cli login
13+ ```
1114
1215# Table of Contents
13161 . [ Quickstart] ( #quickstart )
@@ -38,6 +41,7 @@ checkpoint = "bigcode/starcoder"
3841device = " cuda" # for GPU usage or "cpu" for CPU usage
3942
4043tokenizer = AutoTokenizer.from_pretrained(checkpoint)
44+ # to save memory consider using fp16 or bf16 by specifying torch.dtype=torch.float16 for example
4145model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
4246
4347inputs = tokenizer.encode(" def print_hello_world():" , return_tensors = " pt" ).to(device)
You can’t perform that action at this time.
0 commit comments