Instructions to use FLs-AI/FL-9B-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use FLs-AI/FL-9B-4 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 FLs-AI/FL-9B-4:Q4_K_M # Run inference directly in the terminal: llama cli -hf FLs-AI/FL-9B-4:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf FLs-AI/FL-9B-4:Q4_K_M # Run inference directly in the terminal: llama cli -hf FLs-AI/FL-9B-4: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 FLs-AI/FL-9B-4:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf FLs-AI/FL-9B-4: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 FLs-AI/FL-9B-4:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf FLs-AI/FL-9B-4:Q4_K_M
Use Docker
docker model run hf.co/FLs-AI/FL-9B-4:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use FLs-AI/FL-9B-4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FLs-AI/FL-9B-4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FLs-AI/FL-9B-4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FLs-AI/FL-9B-4:Q4_K_M
- Ollama
How to use FLs-AI/FL-9B-4 with Ollama:
ollama run hf.co/FLs-AI/FL-9B-4:Q4_K_M
- Unsloth Studio
How to use FLs-AI/FL-9B-4 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 FLs-AI/FL-9B-4 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 FLs-AI/FL-9B-4 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for FLs-AI/FL-9B-4 to start chatting
- Pi
How to use FLs-AI/FL-9B-4 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf FLs-AI/FL-9B-4: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": "FLs-AI/FL-9B-4:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use FLs-AI/FL-9B-4 with Docker Model Runner:
docker model run hf.co/FLs-AI/FL-9B-4:Q4_K_M
- Lemonade
How to use FLs-AI/FL-9B-4 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull FLs-AI/FL-9B-4:Q4_K_M
Run and chat with the model
lemonade run user.FL-9B-4-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use FLs-AI/FL-9B-4 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf FLs-AI/FL-9B-4: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 FLs-AI/FL-9B-4:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use FLs-AI/FL-9B-4 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf FLs-AI/FL-9B-4: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 "FLs-AI/FL-9B-4: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"
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,113 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: other
|
| 3 |
+
base_model: Qwen/Qwen3.5-9B-Base
|
| 4 |
+
tags:
|
| 5 |
+
- cobol
|
| 6 |
+
- mainframe
|
| 7 |
+
- code
|
| 8 |
+
- legacy-modernization
|
| 9 |
+
- qwen3_5
|
| 10 |
+
- lora
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# FL-9B-4
|
| 17 |
+
|
| 18 |
+
FL-9B-4 is a COBOL / mainframe code model fine-tuned from **Qwen/Qwen3.5-9B-Base**
|
| 19 |
+
via supervised fine-tuning (SFT) on a curated COBOL instruction dataset. It targets
|
| 20 |
+
legacy-code understanding, COBOL generation, and COBOL→Java translation.
|
| 21 |
+
|
| 22 |
+
- **Base model:** Qwen/Qwen3.5-9B-Base (dense 9B, hybrid linear + full attention)
|
| 23 |
+
- **Method:** LoRA SFT (assistant-only masking), ~3 epochs, bf16
|
| 24 |
+
- **Domain:** COBOL, GnuCOBOL, mainframe knowledge, COBOL↔Java
|
| 25 |
+
|
| 26 |
+
## Benchmark results
|
| 27 |
+
|
| 28 |
+
All code benchmarks compile and execute generated programs against reference
|
| 29 |
+
tests. Evaluated greedy (temperature 0), single sample per task.
|
| 30 |
+
|
| 31 |
+
| Benchmark | Metric | FL-9B-4 |
|
| 32 |
+
|---|---|---|
|
| 33 |
+
| **COBOLEval** | pass@1 | **36.99%** |
|
| 34 |
+
| | compile rate | 82.10% |
|
| 35 |
+
| | test pass rate | 52.98% |
|
| 36 |
+
| **COBOL-JavaTrans (C2J)** | pass@1 | **80.42%** |
|
| 37 |
+
| | compile success rate (CSR) | 96.50% |
|
| 38 |
+
| **MainframeBench** | MCQ accuracy | **71.26%** (1376/1931) |
|
| 39 |
+
| | QA — Token F1 | 12.75% |
|
| 40 |
+
| | QA — ROUGE-L | 10.29% |
|
| 41 |
+
| | Summarization — Token F1 | 27.64% |
|
| 42 |
+
| | Summarization — ROUGE-L | 20.25% |
|
| 43 |
+
| **CobolCodeBench** | INSTRUCT compile rate | **47.83%** (22/46) |
|
| 44 |
+
| | COMPLETE compile rate | 32.61% (15/46) |
|
| 45 |
+
|
| 46 |
+
### Notes on evaluation
|
| 47 |
+
|
| 48 |
+
The MainframeBench MCQ, CobolCodeBench INSTRUCT and COMPLETE numbers were produced
|
| 49 |
+
after fixing harness-side generation limits (the default 16-token MCQ budget and
|
| 50 |
+
2048-token code budget truncated answers, and single-format `cobc` invocation
|
| 51 |
+
rejected valid programs written in a different column format). Fixed evaluation
|
| 52 |
+
uses a larger generation budget and tries `variable`, `free` and `fixed` COBOL
|
| 53 |
+
formats when compiling. Reported numbers reflect the model's actual capability,
|
| 54 |
+
not the truncated defaults.
|
| 55 |
+
|
| 56 |
+
The strongest results — COBOL→Java translation (80% pass@1) and COBOLEval
|
| 57 |
+
(82% compile) — show the model reliably produces valid, working COBOL and
|
| 58 |
+
translates legacy code into working Java.
|
| 59 |
+
|
| 60 |
+
## Intended use
|
| 61 |
+
|
| 62 |
+
- Translating legacy COBOL programs to Java
|
| 63 |
+
- Completing and generating GnuCOBOL programs
|
| 64 |
+
- Answering mainframe / COBOL knowledge questions
|
| 65 |
+
- Assisting with legacy-code modernization workflows
|
| 66 |
+
|
| 67 |
+
## Limitations
|
| 68 |
+
|
| 69 |
+
- Open-ended QA and summarization scores (Token F1 / ROUGE-L) are modest; the
|
| 70 |
+
model is stronger at code generation and translation than at free-form prose.
|
| 71 |
+
- COBOL generation quality varies with column-format conventions; generated code
|
| 72 |
+
may mix fixed and free formats.
|
| 73 |
+
- Evaluated only on GnuCOBOL 3.2; behavior on other COBOL dialects/compilers
|
| 74 |
+
(IBM Enterprise COBOL, etc.) is untested.
|
| 75 |
+
- Not evaluated for safety-critical or production mainframe deployment without
|
| 76 |
+
human review.
|
| 77 |
+
|
| 78 |
+
## Training
|
| 79 |
+
|
| 80 |
+
| Setting | Value |
|
| 81 |
+
|---|---|
|
| 82 |
+
| Base | Qwen/Qwen3.5-9B-Base |
|
| 83 |
+
| Method | LoRA (r=32, α=64), assistant-only SFT |
|
| 84 |
+
| Precision | bf16 |
|
| 85 |
+
| Epochs | ~3 |
|
| 86 |
+
| Sequence length | 8192 (packed) |
|
| 87 |
+
| Hardware | 1× NVIDIA RTX PRO 6000 Blackwell (96 GB) |
|
| 88 |
+
| Frameworks | Unsloth + Transformers |
|
| 89 |
+
|
| 90 |
+
LoRA adapters were applied to attention projections, MLP projections, and the
|
| 91 |
+
linear-attention (`in_proj_*`/`out_proj`) modules of the hybrid Qwen3.5
|
| 92 |
+
architecture; the vision tower, MTP head, and router/embedding/LM-head were
|
| 93 |
+
excluded.
|
| 94 |
+
|
| 95 |
+
## How to use
|
| 96 |
+
|
| 97 |
+
```python
|
| 98 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 99 |
+
|
| 100 |
+
model_id = "FLs-AI/FL-9B-4" # adjust to your repo
|
| 101 |
+
tok = AutoTokenizer.from_pretrained(model_id)
|
| 102 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="bfloat16", device_map="auto")
|
| 103 |
+
|
| 104 |
+
messages = [{"role": "user", "content": "Translate this COBOL program to Java:\n\n<COBOL here>"}]
|
| 105 |
+
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 106 |
+
out = model.generate(inputs, max_new_tokens=2048, temperature=0.0)
|
| 107 |
+
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
## License
|
| 111 |
+
|
| 112 |
+
Inherits the license of the base model (Qwen/Qwen3.5-9B-Base). Review the base
|
| 113 |
+
model's license terms before use.
|