bigcode/commitpackft
Viewer • Updated • 702k • 163k • 109
How to use oblivious/Refact-1.6B-fim-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="oblivious/Refact-1.6B-fim-GGUF", filename="refact-1_6b-Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
How to use oblivious/Refact-1.6B-fim-GGUF with llama.cpp:
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf oblivious/Refact-1.6B-fim-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf oblivious/Refact-1.6B-fim-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf oblivious/Refact-1.6B-fim-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf oblivious/Refact-1.6B-fim-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
docker model run hf.co/oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
How to use oblivious/Refact-1.6B-fim-GGUF with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "oblivious/Refact-1.6B-fim-GGUF"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "oblivious/Refact-1.6B-fim-GGUF",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
How to use oblivious/Refact-1.6B-fim-GGUF with Ollama:
ollama run hf.co/oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
How to use oblivious/Refact-1.6B-fim-GGUF with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for oblivious/Refact-1.6B-fim-GGUF to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for oblivious/Refact-1.6B-fim-GGUF to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for oblivious/Refact-1.6B-fim-GGUF to start chatting
How to use oblivious/Refact-1.6B-fim-GGUF with Docker Model Runner:
docker model run hf.co/oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
How to use oblivious/Refact-1.6B-fim-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull oblivious/Refact-1.6B-fim-GGUF:Q4_K_M
lemonade run user.Refact-1.6B-fim-GGUF-Q4_K_M
lemonade list
This repository contains quantized GGUF format model files for Refact-1.6B.
<fim_prefix>def print_hello_world():\n """<fim_suffix>\n print("Hello world!")<fim_middle>
<empty_output>SYSTEM You are a programming assistant
<empty_output>USER How do I sort a list in Python?
<empty_output>ASSISTANT
llama.cpp command
./main -m refact-1_6b-Q4_K_M.gguf -c 4096 -n -1 -p '<fim_prefix>{prefix}<fim_suffix>{suffix}<fim_middle>'
For other parameters and how to use them, please refer to the llama.cpp documentation
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Base model
refactai/Refact-1_6B-fim