This is a 164M parameters model with the same architecture as StarCoder (8k context length, MQA & FIM). It was trained on the Python data from StarCoderData
for ~6 epochs which amounts to 100B tokens.
Use
Intended use
The model was trained on GitHub code, to assist with some tasks like Assisted Generation. For pure code completion, we advise using our 15B models StarCoder or StarCoderBase.
Generation
# pip install -q transformersfromtransformersimportAutoModelForCausalLM,AutoTokenizercheckpoint="bigcode/tiny_starcoder_py"device="cuda"# for GPU usage or "cpu" for CPU usagetokenizer=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
Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output: