Text Generation
GGUF
English
python
codegen
markdown
smol_llama
llama-cpp
gguf-my-repo
ysn-rfd commited on
Commit
b4be6dd
·
verified ·
1 Parent(s): 15f34e2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +118 -0
README.md ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: BEE-spoke-data/beecoder-220M-python
4
+ datasets:
5
+ - BEE-spoke-data/pypi_clean-deduped
6
+ - bigcode/the-stack-smol-xl
7
+ - EleutherAI/proof-pile-2
8
+ language:
9
+ - en
10
+ tags:
11
+ - python
12
+ - codegen
13
+ - markdown
14
+ - smol_llama
15
+ - llama-cpp
16
+ - gguf-my-repo
17
+ metrics:
18
+ - accuracy
19
+ inference:
20
+ parameters:
21
+ max_new_tokens: 64
22
+ min_new_tokens: 8
23
+ do_sample: true
24
+ epsilon_cutoff: 0.0008
25
+ temperature: 0.3
26
+ top_p: 0.9
27
+ repetition_penalty: 1.02
28
+ no_repeat_ngram_size: 8
29
+ renormalize_logits: true
30
+ widget:
31
+ - text: "def add_numbers(a, b):\n return\n"
32
+ example_title: Add Numbers Function
33
+ - text: "class Car:\n def __init__(self, make, model):\n self.make = make\n\
34
+ \ self.model = model\n\n def display_car(self):\n"
35
+ example_title: Car Class
36
+ - text: 'import pandas as pd
37
+
38
+ data = {''Name'': [''Tom'', ''Nick'', ''John''], ''Age'': [20, 21, 19]}
39
+
40
+ df = pd.DataFrame(data).convert_dtypes()
41
+
42
+ # eda
43
+
44
+ '
45
+ example_title: Pandas DataFrame
46
+ - text: "def factorial(n):\n if n == 0:\n return 1\n else:\n"
47
+ example_title: Factorial Function
48
+ - text: "def fibonacci(n):\n if n <= 0:\n raise ValueError(\"Incorrect input\"\
49
+ )\n elif n == 1:\n return 0\n elif n == 2:\n return 1\n \
50
+ \ else:\n"
51
+ example_title: Fibonacci Function
52
+ - text: 'import matplotlib.pyplot as plt
53
+
54
+ import numpy as np
55
+
56
+ x = np.linspace(0, 10, 100)
57
+
58
+ # simple plot
59
+
60
+ '
61
+ example_title: Matplotlib Plot
62
+ - text: "def reverse_string(s:str) -> str:\n return\n"
63
+ example_title: Reverse String Function
64
+ - text: "def is_palindrome(word:str) -> bool:\n return\n"
65
+ example_title: Palindrome Function
66
+ - text: "def bubble_sort(lst: list):\n n = len(lst)\n for i in range(n):\n \
67
+ \ for j in range(0, n-i-1):\n"
68
+ example_title: Bubble Sort Function
69
+ - text: "def binary_search(arr, low, high, x):\n if high >= low:\n mid =\
70
+ \ (high + low) // 2\n if arr[mid] == x:\n return mid\n \
71
+ \ elif arr[mid] > x:\n"
72
+ example_title: Binary Search Function
73
+ pipeline_tag: text-generation
74
+ ---
75
+
76
+ # ysn-rfd/beecoder-220M-python-Q8_0-GGUF
77
+ This model was converted to GGUF format from [`BEE-spoke-data/beecoder-220M-python`](https://huggingface.co/BEE-spoke-data/beecoder-220M-python) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
78
+ Refer to the [original model card](https://huggingface.co/BEE-spoke-data/beecoder-220M-python) for more details on the model.
79
+
80
+ ## Use with llama.cpp
81
+ Install llama.cpp through brew (works on Mac and Linux)
82
+
83
+ ```bash
84
+ brew install llama.cpp
85
+
86
+ ```
87
+ Invoke the llama.cpp server or the CLI.
88
+
89
+ ### CLI:
90
+ ```bash
91
+ llama-cli --hf-repo ysn-rfd/beecoder-220M-python-Q8_0-GGUF --hf-file beecoder-220m-python-q8_0.gguf -p "The meaning to life and the universe is"
92
+ ```
93
+
94
+ ### Server:
95
+ ```bash
96
+ llama-server --hf-repo ysn-rfd/beecoder-220M-python-Q8_0-GGUF --hf-file beecoder-220m-python-q8_0.gguf -c 2048
97
+ ```
98
+
99
+ Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well.
100
+
101
+ Step 1: Clone llama.cpp from GitHub.
102
+ ```
103
+ git clone https://github.com/ggerganov/llama.cpp
104
+ ```
105
+
106
+ Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux).
107
+ ```
108
+ cd llama.cpp && LLAMA_CURL=1 make
109
+ ```
110
+
111
+ Step 3: Run inference through the main binary.
112
+ ```
113
+ ./llama-cli --hf-repo ysn-rfd/beecoder-220M-python-Q8_0-GGUF --hf-file beecoder-220m-python-q8_0.gguf -p "The meaning to life and the universe is"
114
+ ```
115
+ or
116
+ ```
117
+ ./llama-server --hf-repo ysn-rfd/beecoder-220M-python-Q8_0-GGUF --hf-file beecoder-220m-python-q8_0.gguf -c 2048
118
+ ```