Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| tiny_starcoder_py.Q2_K.gguf | Q2_K | 0.1GB |
| tiny_starcoder_py.IQ3_XS.gguf | IQ3_XS | 0.1GB |
| tiny_starcoder_py.IQ3_S.gguf | IQ3_S | 0.1GB |
| tiny_starcoder_py.Q3_K_S.gguf | Q3_K_S | 0.1GB |
| tiny_starcoder_py.IQ3_M.gguf | IQ3_M | 0.11GB |
| tiny_starcoder_py.Q3_K.gguf | Q3_K | 0.11GB |
| tiny_starcoder_py.Q3_K_M.gguf | Q3_K_M | 0.11GB |
| tiny_starcoder_py.Q3_K_L.gguf | Q3_K_L | 0.12GB |
| tiny_starcoder_py.IQ4_XS.gguf | IQ4_XS | 0.11GB |
| tiny_starcoder_py.Q4_0.gguf | Q4_0 | 0.12GB |
| tiny_starcoder_py.IQ4_NL.gguf | IQ4_NL | 0.12GB |
| tiny_starcoder_py.Q4_K_S.gguf | Q4_K_S | 0.12GB |
| tiny_starcoder_py.Q4_K.gguf | Q4_K | 0.12GB |
| tiny_starcoder_py.Q4_K_M.gguf | Q4_K_M | 0.12GB |
| tiny_starcoder_py.Q4_1.gguf | Q4_1 | 0.12GB |
| tiny_starcoder_py.Q5_0.gguf | Q5_0 | 0.13GB |
| tiny_starcoder_py.Q5_K_S.gguf | Q5_K_S | 0.13GB |
| tiny_starcoder_py.Q5_K.gguf | Q5_K | 0.14GB |
| tiny_starcoder_py.Q5_K_M.gguf | Q5_K_M | 0.14GB |
| tiny_starcoder_py.Q5_1.gguf | Q5_1 | 0.14GB |
| tiny_starcoder_py.Q6_K.gguf | Q6_K | 0.15GB |
| tiny_starcoder_py.Q8_0.gguf | Q8_0 | 0.18GB |
1# pip install -q transformers
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4checkpoint = "bigcode/tiny_starcoder_py"
5device = "cuda" # for GPU usage or "cpu" for CPU usage
6
7tokenizer = AutoTokenizer.from_pretrained(checkpoint)
8model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
9
10inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
11outputs = model.generate(inputs)
12print(tokenizer.decode(outputs[0]))1input_text = "<fim_prefix>def print_one_two_three():\n print('one')\n <fim_suffix>\n print('three')<fim_middle>"
2inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
3outputs = model.generate(inputs)
4print(tokenizer.decode(outputs[0]))