rovdetection commited on
Commit
e268faf
·
verified ·
1 Parent(s): bb41e24

Add model card

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - code
6
+ - llama-cpp
7
+ base_model: rovdetection/code-1b-chat-v2
8
+ ---
9
+
10
+ # code-1b-chat-v2 GGUF
11
+
12
+ GGUF quantization of [rovdetection/code-1b-chat-v2](https://huggingface.co/rovdetection/code-1b-chat-v2).
13
+
14
+ ## Available files
15
+
16
+ | File | Quant | Size | Use case |
17
+ |------|-------|------|----------|
18
+ | `code-1b-chat-v2-Q4_K_M.gguf` | Q4_K_M | ~700 MB | Recommended — best quality/speed |
19
+
20
+ ## Usage with llama-cpp-python
21
+
22
+ ```python
23
+ from llama_cpp import Llama
24
+
25
+ llm = Llama.from_pretrained(
26
+ repo_id="rovdetection/code-1b-chat-v2-gguf",
27
+ filename="code-1b-chat-v2-Q4_K_M.gguf",
28
+ n_ctx=2048,
29
+ )
30
+
31
+ SYSTEM = "Below is an instruction that describes a coding task. Write a response that appropriately completes the request."
32
+ prompt = f"{SYSTEM}\n\n### Instruction:\nWrite a fibonacci function.\n\n### Response:\n"
33
+
34
+ out = llm(prompt, max_tokens=200, temperature=0.7, stop=["### Instruction:"])
35
+ print(out["choices"][0]["text"])
36
+ ```