Instructions to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M # Run inference directly in the terminal: llama cli -hf Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M # Run inference directly in the terminal: llama cli -hf Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
Use pre-built binary
# 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 Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
Build from source code
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 Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
Use Docker
docker model run hf.co/Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
- LM Studio
- Jan
- vLLM
How to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
- SGLang
How to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with Ollama:
ollama run hf.co/Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
- Unsloth Studio
How to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
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 Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF to start chatting
Install Unsloth Studio (Windows)
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 Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with Docker Model Runner:
docker model run hf.co/Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
- Lemonade
How to use Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF:Q5_K_M
Run and chat with the model
lemonade run user.Refact-1_6B-fim-Q5_K_M-GGUF-Q5_K_M
List all available models
lemonade list
| pipeline_tag: text-generation | |
| inference: true | |
| widget: | |
| - text: 'def print_hello_world():' | |
| example_title: Hello world | |
| group: Python | |
| license: bigscience-openrail-m | |
| pretrain-datasets: | |
| - books | |
| - arxiv | |
| - c4 | |
| - falcon-refinedweb | |
| - wiki | |
| - github-issues | |
| - stack_markdown | |
| - self-made dataset of permissive github code | |
| datasets: | |
| - bigcode/the-stack-dedup | |
| - rombodawg/2XUNCENSORED_MegaCodeTraining188k | |
| - bigcode/commitpackft | |
| metrics: | |
| - code_eval | |
| library_name: transformers | |
| tags: | |
| - code | |
| - llama-cpp | |
| - gguf-my-repo | |
| language: | |
| - en | |
| base_model: refactai/Refact-1_6B-fim | |
| model-index: | |
| - name: Refact-1.6B | |
| results: | |
| - task: | |
| type: text-generation | |
| dataset: | |
| name: HumanEval | |
| type: openai_humaneval | |
| metrics: | |
| - type: pass@1 | |
| value: 32.0 | |
| name: pass@1 (T=0.01) | |
| verified: false | |
| - type: pass@1 | |
| value: 31.5 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@10 | |
| value: 53.0 | |
| name: pass@10 (T=0.8) | |
| verified: false | |
| - type: pass@100 | |
| value: 76.9 | |
| name: pass@100 (T=0.8) | |
| verified: false | |
| - task: | |
| type: text-generation | |
| dataset: | |
| name: HumanEvalSynthesize Python | |
| type: bigcode/humanevalpack | |
| metrics: | |
| - type: pass@1 | |
| value: 35.8 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 31.6 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 29.1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 26.3 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 18.38 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 12.28 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 15.12 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 13.17 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 2.8 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 26.92 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 26.85 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 30.76 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 25.94 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 8.44 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 26.46 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 17.86 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 20.94 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 18.78 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: -1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - task: | |
| type: text-generation | |
| dataset: | |
| name: MBPP | |
| type: mbpp | |
| metrics: | |
| - type: pass@1 | |
| value: 31.15 | |
| name: pass@1 (T=0.01) | |
| verified: false | |
| - task: | |
| type: text-generation | |
| dataset: | |
| name: DS-1000 (Overall Completion) | |
| type: ds1000 | |
| metrics: | |
| - type: pass@1 | |
| value: 10.1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - task: | |
| type: text-generation | |
| dataset: | |
| name: MultiPL-HumanEval (C++) | |
| type: nuprl/MultiPL-E | |
| metrics: | |
| - type: pass@1 | |
| value: 21.61 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 13.91 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 9.5 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 53.57 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 21.58 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 13.75 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 26.88 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 15.26 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 23.04 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 12.1 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 29.6 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 13.77 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 12.68 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 4.29 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 19.54 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 18.33 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 5.7 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 17.68 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| - type: pass@1 | |
| value: 25 | |
| name: pass@1 (T=0.2) | |
| verified: false | |
| # Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF | |
| This model was converted to GGUF format from [`refactai/Refact-1_6B-fim`](https://huggingface.co/refactai/Refact-1_6B-fim) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. | |
| Refer to the [original model card](https://huggingface.co/refactai/Refact-1_6B-fim) for more details on the model. | |
| ## Use with llama.cpp | |
| Install llama.cpp through brew (works on Mac and Linux) | |
| ```bash | |
| brew install llama.cpp | |
| ``` | |
| Invoke the llama.cpp server or the CLI. | |
| ### CLI: | |
| ```bash | |
| llama-cli --hf-repo Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF --hf-file refact-1_6b-fim-q5_k_m.gguf -p "The meaning to life and the universe is" | |
| ``` | |
| ### Server: | |
| ```bash | |
| llama-server --hf-repo Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF --hf-file refact-1_6b-fim-q5_k_m.gguf -c 2048 | |
| ``` | |
| 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. | |
| Step 1: Clone llama.cpp from GitHub. | |
| ``` | |
| git clone https://github.com/ggerganov/llama.cpp | |
| ``` | |
| 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). | |
| ``` | |
| cd llama.cpp && LLAMA_CURL=1 make | |
| ``` | |
| Step 3: Run inference through the main binary. | |
| ``` | |
| ./llama-cli --hf-repo Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF --hf-file refact-1_6b-fim-q5_k_m.gguf -p "The meaning to life and the universe is" | |
| ``` | |
| or | |
| ``` | |
| ./llama-server --hf-repo Netsnake/Refact-1_6B-fim-Q5_K_M-GGUF --hf-file refact-1_6b-fim-q5_k_m.gguf -c 2048 | |
| ``` | |