Downloads · 30 days
27
3% of all-time downloads
epinnock/wizardcoder-1b-merged
wizardcoder-1b-merged is a text generation model from epinnock. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as bigcode-openrail-m.
1. Model Summary 2. Use 3. Limitations 4. Training 5. License
Downloads · 30 days
27
3% of all-time downloads
All-time downloads
944
Public
Repo size
4.5 GB
Likes
0
Public
Click a slice to open those files.
.bin2.3 GB · 100%
From the Hugging Face model README
1B version of StarCoderBase. LoRa finetuned on Evol-Instruct-Code-80k-v1 dataset generated using the Evol-Teacher repo. Based on Previous works of @WizardLM
# pip install -q transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "epinnock/wizardcoder-1b-merged"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output:
input_text = "<fim_prefix>def print_hello_world():\n <fim_suffix>\n print('Hello world!')<fim_middle>"
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
The pretraining dataset of the model was filtered for permissive licenses only. Nevertheless, the model can generate source code verbatim from the dataset. The code's license might require attribution and/or other specific requirements that must be respected. We provide a search index that let's you search through the pretraining data to identify where generated code came from and apply the proper attribution to your code.
The model has been trained on source code from 80+ programming languages. The predominant natural language in source code is English although other languages are also present. As such the model is capable of generating code snippets provided some context but the generated code is not guaranteed to work as intended. It can be inefficient, contain bugs or exploits. See the paper for an in-depth discussion of the model limitations.
starcoder/finetune/finetune.py --model_path=bigcode/starcoderbase-1b --dataset_name=nickrosh/Evol-Instruct-Code-80k-v1 --split=train --size_valid_set 5000 --streaming --seq_length 2048 --max_steps 2400 --batch_size 6 --input_column_name=instruction --gradient_accumulation_steps 16 --learning_rate 1e-4 --lr_scheduler_type=cosine --num_warmup_steps 100 --weight_decay 0.05
The model is licensed under the BigCode OpenRAIL-M v1 license agreement. You can find the full agreement here.