--- license: apache-2.0 base_model: Qwen/Qwen3.5-9B tags: - cobol - mainframe - code - jcl - db2 - qwen3_5 - code language: - en pipeline_tag: text-generation --- # FL-9B-0.2 FL-9B-0.2 is a fine-tune of Qwen3.5-9B focused on legacy mainframe code, primarily COBOL, with additional coverage of JCL, DB2 and embedded SQL. It is meant for teams working with COBOL codebases who want a local model that writes, completes and translates mainframe code. The base model keeps its hybrid layout (Gated DeltaNet linear-attention layers interleaved with full-attention layers) and native 262k context. Fine-tuning was done with QLoRA on a single GPU, so the release is a merged set of weights ready for vLLM, SGLang, Transformers, and llama.cpp. ## Training - Base: Qwen/Qwen3.5-9B - Method: supervised fine-tuning, QLoRA (rank 256), merged back to bf16 - Hardware: one RTX 5090 (32 GB) ## Benchmarks Numbers below are for FL-9B-0.2. FL-9B-0.1 is the previous release. | Benchmark | Metric | FL-9B-0.1 | FL-9B-0.2 | |-----------|--------|-----------|-------| | COBOLEval | pass@1 | 37.0% | 41.8% | | MainframeBench | MCQ accuracy | 71.3% | 77.4% | | MainframeBench | QA token F1 | 12.8% | 18.5% | | MainframeBench | Summarization token F1 | 27.6% | 35.5% | | CobolCodeBench | INSTRUCT compile rate | 47.8% | 67.4% | | CobolCodeBench | COMPLETE compile rate | 32.6% | 41.3% | | COBOL to Java | pass@1 | 80.4% | 54.5% | ### Comparison with other models on COBOLEval The scores for the other models come from the COBOL-Coder paper and the Skylar model card, so harness details differ and the numbers are indicative rather than a controlled head-to-head. | Model | Params | Compile / CSR | pass@1 | |-------|--------|---------------|--------| | GPT-4o | - | 41.8% | 16.4% | | Skylar-980M-Cobol | 980M | 80.1% | 7.5% | | COBOL-Coder-7B | 7B | 73.8% | 44.7% | | COBOL-Coder-14B | 14B | 74.0% | 49.3% | | FL-9B-0.2 | 9B | 90.6% | 41.8% | FL-9B-0.2 has the highest compile rate in this group and a pass@1 above GPT-4o and Skylar, close to COBOL-Coder-7B. On COBOL to Java translation it trails the COBOL-Coder models (pass@1 54.5% against roughly 82 to 84%), which is the main area for the next data pass. ## Usage The model thinks by default, the same as base Qwen3.5. For code generation and the benchmark numbers above, thinking is turned off and generation is greedy. ### vLLM ```bash vllm serve FLs-AI/FL-9B-0.2 --port 8000 --max-model-len 8192 --reasoning-parser qwen3 ``` ### Transformers ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "FLs-AI/FL-9B-0.2" tok = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="bfloat16", device_map="auto") messages = [{"role": "user", "content": "Write a COBOL program that reads a file and prints each record."}] prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False) out = model.generate(**tok(prompt, return_tensors="pt").to(model.device), max_new_tokens=1024) print(tok.decode(out[0], skip_special_tokens=True)) ``` ### Recommended settings for COBOL - Turn thinking off: `enable_thinking=False` - Greedy decoding: `temperature=0` - Leave repetition penalty at 1.0. COBOL is a repetitive language by nature, and a penalty above 1.0 breaks otherwise valid, repetitive source. ## Notes on GGUF GGUF builds are published separately. Column layout matters when compiling generated COBOL: code belongs in area B (column 8 onward), and a first line flush to column 1 will fail under `cobc -fformat=variable`. The benchmark harness normalizes columns before compiling. ## License Apache 2.0, following the base model.