How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="rovdetection/code-1b-chat-v2-gguf",
	filename="code-1b-chat-v2-Q4_K_M.gguf",
)
output = llm(
	"Once upon a time,",
	max_tokens=512,
	echo=True
)
print(output)

code-1b-chat-v2 GGUF

GGUF quantization of rovdetection/code-1b-chat-v2.

Available files

File Quant Size Use case
code-1b-chat-v2-Q4_K_M.gguf Q4_K_M ~700 MB Recommended โ€” best quality/speed

Usage with llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
    repo_id="rovdetection/code-1b-chat-v2-gguf",
    filename="code-1b-chat-v2-Q4_K_M.gguf",
    n_ctx=2048,
)

SYSTEM = "Below is an instruction that describes a coding task. Write a response that appropriately completes the request."
prompt = f"{SYSTEM}\n\n### Instruction:\nWrite a fibonacci function.\n\n### Response:\n"

out = llm(prompt, max_tokens=200, temperature=0.7, stop=["### Instruction:"])
print(out["choices"][0]["text"])
Downloads last month
75
GGUF
Model size
1B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for rovdetection/code-1b-chat-v2-gguf

Quantized
(1)
this model

Space using rovdetection/code-1b-chat-v2-gguf 1