LoRA adapter fine-tuned on
5,004 compilable Harbour and FiveWin (FWH) examples for code generation. Built on top of
Qwen3.5-35B-A3B, a 35B Mixture-of-Experts model with 256 experts (8 active per token).
Training data sourced from the
Harbour project — an open-source Clipper-compatible compiler — and
FiveWin (FWH) GUI framework.
1{
2 "instruction": "Write a Harbour function that creates a 2D array...",
3 "input": "",
4 "system": "You are an expert Harbour programmer...",
5 "output": "FUNCTION CreateTable()\n LOCAL aTable := {}\n ...",
6 "task_type": "code_generation"
7}
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base_model = AutoModelForCausalLM.from_pretrained(
5 "Qwen/Qwen3.5-35B-A3B",
6 load_in_4bit=True,
7 device_map="auto",
8)
9model = PeftModel.from_pretrained(base_model, "fivetech/Harbour")
10tokenizer = AutoTokenizer.from_pretrained("fivetech/Harbour")
11
12prompt = "Write a Harbour function that splits a CSV string into an array."
13messages = [
14 {"role": "system", "content": "You are an expert Harbour programmer. Write compilable code."},
15 {"role": "user", "content": prompt},
16]
17text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
18inputs = tokenizer([text], return_tensors="pt").to(model.device)
19
20output = model.generate(**inputs, max_new_tokens=1500, temperature=0.2)
21print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
1# Export to GGUF
2python -m unsloth.save_pretrained_gguf model_output/ ./tokenizer/ q4_k_m
3
4# Then use with Ollama
5ollama create harbour-coder -f Modelfile
Evaluated on 100 Harbour programming tests (Arrays, OOP, Functions, Database, File I/O, Control flow):