Text Generation
PEFT
Safetensors
GGUF
Transformers
English
Spanish
harbour
fivewin
fwh
lora
sft
trl
unsloth
code-generation
xbase
clipper
conversational
Instructions to use fivetech/Harbour with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use fivetech/Harbour with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/home/fivetech/finetune/models/Qwen3.6-35B-A3B") model = PeftModel.from_pretrained(base_model, "fivetech/Harbour") - Transformers
How to use fivetech/Harbour with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fivetech/Harbour") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("fivetech/Harbour", dtype="auto") - llama-cpp-python
How to use fivetech/Harbour with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="fivetech/Harbour", filename="Qwen3.6-35B-A3B-LoRA-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use fivetech/Harbour 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 fivetech/Harbour:Q4_K_M # Run inference directly in the terminal: llama cli -hf fivetech/Harbour:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf fivetech/Harbour:Q4_K_M # Run inference directly in the terminal: llama cli -hf fivetech/Harbour:Q4_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 fivetech/Harbour:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf fivetech/Harbour:Q4_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 fivetech/Harbour:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf fivetech/Harbour:Q4_K_M
Use Docker
docker model run hf.co/fivetech/Harbour:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use fivetech/Harbour with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fivetech/Harbour" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fivetech/Harbour", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/fivetech/Harbour:Q4_K_M
- SGLang
How to use fivetech/Harbour 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 "fivetech/Harbour" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fivetech/Harbour", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "fivetech/Harbour" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fivetech/Harbour", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use fivetech/Harbour with Ollama:
ollama run hf.co/fivetech/Harbour:Q4_K_M
- Unsloth Studio
How to use fivetech/Harbour 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 fivetech/Harbour 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 fivetech/Harbour to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for fivetech/Harbour to start chatting
- Pi
How to use fivetech/Harbour with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf fivetech/Harbour:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "fivetech/Harbour:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use fivetech/Harbour with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf fivetech/Harbour:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default fivetech/Harbour:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use fivetech/Harbour with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf fivetech/Harbour:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "fivetech/Harbour:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use fivetech/Harbour with Docker Model Runner:
docker model run hf.co/fivetech/Harbour:Q4_K_M
- Lemonade
How to use fivetech/Harbour with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull fivetech/Harbour:Q4_K_M
Run and chat with the model
lemonade run user.Harbour-Q4_K_M
List all available models
lemonade list
| #!/usr/bin/env python3 | |
| """Continue test battery from checkpoint - tests 51-100""" | |
| import json, time, subprocess, requests, sys | |
| from pathlib import Path | |
| from datetime import datetime | |
| OLLAMA_URL = "http://localhost:11434/api/generate" | |
| MODEL = "qwen3.6:35b" | |
| HARBOUR = "/home/fivetech/harbour/bin/linux/gcc/harbour" | |
| WORK_DIR = Path("/home/fivetech/finetune/test_output") | |
| RESULTS_FILE = Path("/home/fivetech/finetune/test_baseline_100.json") | |
| SYSTEM = """You are an expert Harbour programmer. Write clean, correct, COMPILABLE Harbour code. | |
| Use Hungarian notation: n=numeric, c=character, l=logical, a=array, o=object, d=date. | |
| Use 3-space indentation. | |
| Do NOT include explanations, markdown, or #include. Only raw Harbour code. | |
| End functions with RETURN and END FUNCTION.""" | |
| def query(prompt, timeout=180): | |
| payload = {"model": MODEL, "prompt": prompt, "stream": False, | |
| "options": {"temperature": 0.2, "num_predict": 1500, "top_p": 0.9}} | |
| try: | |
| t0 = time.time() | |
| r = requests.post(OLLAMA_URL, json=payload, timeout=timeout) | |
| d = r.json() | |
| return {"resp": d.get("response",""), "tok": d.get("eval_count",0), | |
| "dur": time.time()-t0, "tps": d.get("eval_count",0)/max(d.get("eval_duration",1)/1e9,.001)} | |
| except Exception as e: | |
| return {"resp":"", "tok":0, "dur":0, "tps":0, "err":str(e)} | |
| def compile_hb(code): | |
| f = WORK_DIR/"test.prg" | |
| f.write_text(code) | |
| try: | |
| r = subprocess.run([HARBOUR, str(f), "-n", "-w"], capture_output=True, text=True, timeout=20) | |
| return r.returncode == 0, (r.stderr or r.stdout).strip()[:400] | |
| except: | |
| return False, "timeout" | |
| def clean(resp): | |
| lines = resp.split('\n') | |
| in_code = False | |
| code = [] | |
| for line in lines: | |
| s = line.strip() | |
| if s.startswith('```'): | |
| in_code = not in_code | |
| continue | |
| if in_code: | |
| code.append(line) | |
| elif not code: | |
| u = s.upper() | |
| if any(u.startswith(k) for k in ['FUNCTION','PROCEDURE','LOCAL','STATIC','#DEFINE','CLASS','METHOD','RETURN','SET','REQUEST','MEMVAR','*']): | |
| code.append(line) | |
| return '\n'.join(code).strip() if code else resp.strip() | |
| def save(results, meta): | |
| with open(RESULTS_FILE, "w") as f: | |
| json.dump({"model":MODEL,"ts":datetime.now().isoformat(),**meta,"results":results}, f, indent=2, ensure_ascii=False) | |
| # Tests 70-100 (remaining after A01-A48, O01-O21) | |
| TESTS = [ | |
| ("O22","OOP","Composition","Write Harbour classes using composition Engine inside Car."), | |
| ("X01","Other","Preprocessor defines","Write Harbour preprocessor #define for constants and #ifdef platform detection."), | |
| ("X02","Other","Custom command","Write #xcommand shorthand for declaring variables with initialization."), | |
| ("X03","Other","HB_Is functions","Write validation using HB_IsString HB_IsNumeric HB_IsArray HB_IsNil."), | |
| ("X04","Other","Regex validation","Write Harbour code using HB_RegExCompile HB_RegExMatch to validate emails."), | |
| ("X05","Other","Serialization","Write Harbour code using HB_Serialize HB_Deserialize to save load hash."), | |
| ("X06","Other","File path ops","Write Harbour code using hb_DirBuild hb_FileNameGet hb_PathJoin."), | |
| ("X07","Other","Version check","Write Harbour code using HB_Version to detect version conditionally."), | |
| ("X08","Other","Translation","Write Harbour #translate directives mapping alternative syntax."), | |
| ("X09","Other","Conditional defines","Write Harbour code with nested ifdef ifndef else for feature toggling."), | |
| ("F01","Functions","Default params","Write Harbour function with default parameter values."), | |
| ("F02","Functions","Recursion","Write recursive Harbour function for factorial."), | |
| ("F03","Functions","Scope demo","Write Harbour code demonstrating LOCAL STATIC PRIVATE PUBLIC scope."), | |
| ("F04","Functions","Code block eval","Write Harbour code using Eval with code blocks and AEval."), | |
| ("F05","Functions","Error handling","Write Harbour function with BEGIN SEQUENCE RECOVER for safe reading."), | |
| ("F06","Functions","Pass by ref","Write Harbour function modifying caller variable with @."), | |
| ("F07","Functions","Variable args","Write Harbour function accepting variable number of arguments."), | |
| ("F08","Functions","Nested calls","Write Harbour code with nested function calls and scope isolation."), | |
| ("D01","Database","Create DBF","Write Harbour code creating DBF with DBCreate specifying field types."), | |
| ("D02","Database","Open append","Write Harbour code opening DBF with DBUseArea appending records."), | |
| ("D03","Database","Indexing","Write Harbour code creating index with ORDCREATE and DBSeek."), | |
| ("D04","Database","DBEval sum","Write Harbour code using DBEval to sum numeric field."), | |
| ("D05","Database","Filter","Write Harbour code using SET FILTER TO processing filtered records."), | |
| ("D06","Database","Multi-area","Write Harbour code using multiple work areas with SELECT."), | |
| ("D07","Database","Relations","Write Harbour code setting parent-child relation DBSetRelation."), | |
| ("I01","File I/O","Text read write","Write Harbour functions for text file R/W using FCreate FOpen FRead FWrite FClose."), | |
| ("I02","File I/O","Line by line","Write Harbour code reading file line by line with FEof."), | |
| ("I03","File I/O","Directory list","Write Harbour code using Directory listing files with pattern."), | |
| ("I04","File I/O","File exists","Write Harbour code checking file existence with File function."), | |
| ("C01","Control","Complex IF","Write Harbour function nested IF ELSEIF ELSE with AND OR conditions."), | |
| ("C02","Control","Nested loops","Write Harbour code nested FOR loops EXIT LOOP finding combinations."), | |
| ] | |
| # Load existing results | |
| with open(RESULTS_FILE) as f: | |
| data = json.load(f) | |
| results = data["results"] | |
| pass_c = data["pass"] | |
| fail_c = data["fail"] | |
| print(f"{'='*60}") | |
| print(f"CONTINUING from test {len(results)+1}/100") | |
| print(f"So far: {pass_c} pass, {fail_c} fail ({data['rate']:.1f}%)") | |
| print(f"{'='*60}") | |
| for i, (tid, cat, name, prompt) in enumerate(TESTS, len(results)+1): | |
| sys.stdout.write(f"\r[{i:3d}/100] {tid} {name}...") | |
| sys.stdout.flush() | |
| res = query(prompt) | |
| if res.get("err"): | |
| results.append({"id":tid,"cat":cat,"name":name,"ok":False,"err":res["err"],"code":"","tok":0,"tps":0,"dur":0,"lines":0}) | |
| fail_c += 1 | |
| print(f"\r[{i:3d}/100] {tid} {name}... ERR: {res['err'][:50]}") | |
| save(results, {"pass":pass_c,"fail":fail_c,"rate":pass_c/len(results)*100}) | |
| continue | |
| code = clean(res["resp"]) | |
| ok, cerr = compile_hb(code) | |
| if ok: pass_c += 1 | |
| else: fail_c += 1 | |
| err_short = cerr.split('\n')[0][:60] if cerr and not ok else "" | |
| print(f"\r[{i:3d}/100] {tid} {name}... {'PASS' if ok else 'FAIL'} | {code.count(chr(10))+1}L | {res['tok']}t | {res['tps']:.0f}tps" + (f" | {err_short}" if err_short else "")) | |
| results.append({"id":tid,"cat":cat,"name":name,"ok":ok,"err":cerr[:400],"code":code[:2500],"tok":res["tok"],"tps":res["tps"],"dur":res["dur"],"lines":code.count('\n')+1}) | |
| save(results, {"pass":pass_c,"fail":fail_c,"rate":pass_c/len(results)*100}) | |
| # Final summary | |
| print(f"\n\n{'='*60}") | |
| print(f"FINAL RESULTS (100/100)") | |
| print(f"{'='*60}") | |
| cats = {} | |
| for r in results: | |
| c = r["cat"] | |
| if c not in cats: cats[c] = [0,0] | |
| cats[c][0 if r["ok"] else 1] += 1 | |
| print(f"\n{'Category':<12} {'Pass':>5} {'Fail':>5} {'Rate':>7}") | |
| print("-"*32) | |
| for c in sorted(cats): | |
| p,f = cats[c] | |
| print(f"{c:<12} {p:>5} {f:>5} {p/(p+f)*100:>6.0f}%") | |
| print(f"\n{'TOTAL':<12} {pass_c:>5} {fail_c:>5} {pass_c/len(results)*100:>6.0f}%") | |
| total_tok = sum(r["tok"] for r in results) | |
| total_dur = sum(r["dur"] for r in results) | |
| print(f"Tokens: {total_tok:,} | Time: {total_dur:.0f}s | TPS: {total_tok/max(total_dur,1):.0f}") | |
| save(results, {"pass":pass_c,"fail":fail_c,"rate":pass_c/len(results)*100,"cats":cats, | |
| "total_tok":total_tok,"total_dur":total_dur}) | |
| print(f"\nSaved: {RESULTS_FILE}") | |