This model is a fine-tuned version of
Qwen/Qwen2.5-Coder-3B-Instruct, optimized for generating natural language documentation from COBOL source code. The fine-tuning was done using
freeze fine-tuning on the
last transformer layer only, preserving the rest of the model's pretrained weights.
This model is specialized in generating descriptive documentation for legacy COBOL code, especially useful for:
1from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
2
3model_name = "V7W3D/qwen-code-doc-ft"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForCausalLM.from_pretrained(model_name)
6
7doc_gen = pipeline("text-generation", model=model, tokenizer=tokenizer)
8
9prompt = "### Document this COBOL code:\n\n IDENTIFICATION DIVISION.\n PROGRAM-ID. HELLO-WORLD.\n PROCEDURE DIVISION.\n DISPLAY 'HELLO, WORLD!'\n STOP RUN.\n\n### Documentation:"
10response = doc_gen(prompt, max_new_tokens=200, do_sample=False)
11
12print(response[0]["generated_text"])