File size: 2,901 Bytes
743ece5
 
21970e8
743ece5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424c23a
743ece5
424c23a
 
 
 
f340a3a
 
743ece5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39c42cf
743ece5
 
 
55da9c7
 
 
 
422db7f
55da9c7
422db7f
 
 
 
 
 
 
55da9c7
5bda17a
 
55da9c7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
license: apache-2.0
base_model: BEE-spoke-data/smol_llama-220M-GQA
datasets:
- BEE-spoke-data/pypi_clean-deduped
- bigcode/the-stack-smol-xl
- EleutherAI/proof-pile-2
language:
- en
tags:
- python
- codegen
- markdown
- smol_llama
metrics:
- accuracy
inference:
  parameters:
    max_new_tokens: 64
    min_new_tokens: 8
    do_sample: true
    epsilon_cutoff: 0.0008
    temperature: 0.3
    top_p: 0.9
    repetition_penalty: 1.02
    no_repeat_ngram_size: 8
    renormalize_logits: true
widget:
- text: |
    def add_numbers(a, b):
        return
  example_title: Add Numbers Function
- text: |
    class Car:
        def __init__(self, make, model):
            self.make = make
            self.model = model

        def display_car(self):
  example_title: Car Class
- text: |
    import pandas as pd
    data = {'Name': ['Tom', 'Nick', 'John'], 'Age': [20, 21, 19]}
    df = pd.DataFrame(data).convert_dtypes()
    # eda
  example_title: Pandas DataFrame
- text: |
    def factorial(n):
        if n == 0:
            return 1
        else:
  example_title: Factorial Function
- text: |
    def fibonacci(n):
        if n <= 0:
            raise ValueError("Incorrect input")
        elif n == 1:
            return 0
        elif n == 2:
            return 1
        else:
  example_title: Fibonacci Function
- text: |
    import matplotlib.pyplot as plt
    import numpy as np
    x = np.linspace(0, 10, 100)
    # simple plot
  example_title: Matplotlib Plot
- text: |
    def reverse_string(s:str) -> str:
        return
  example_title: Reverse String Function
- text: |
    def is_palindrome(word:str) -> bool:
        return
  example_title: Palindrome Function
- text: |
    def bubble_sort(lst: list):
        n = len(lst)
        for i in range(n):
            for j in range(0, n-i-1):
  example_title: Bubble Sort Function
- text: |
    def binary_search(arr, low, high, x):
        if high >= low:
            mid = (high + low) // 2
            if arr[mid] == x:
                return mid
            elif arr[mid] > x:
  example_title: Binary Search Function
pipeline_tag: text-generation
---

# BEE-spoke-data/beecoder-220M-python




This is `BEE-spoke-data/smol_llama-220M-GQA` fine-tuned for code generation on:

- filtered version of stack-smol-XL
- deduped version of 'algebraic stack' from proof-pile-2
- cleaned and deduped pypi (last dataset)

This model (and the base model) were both trained using ctx length 2048.  

## examples

> Example script for inference testing: [here](https://gist.github.com/pszemraj/c7738f664a64b935a558974d23a7aa8c)

It has its limitations at 220M, but seems decent for single-line or docstring generation, and/or being used for speculative decoding for such purposes.



![image/png](https://cdn-uploads.huggingface.co/production/uploads/60bccec062080d33f875cd0c/bLrtpr7Vi_MPvtF7mozDN.png)

The screenshot is on CPU on a laptop.

---