--- base_model: mistralai/Mistral-7B-Instruct-v0.2 library_name: peft pipeline_tag: text-generation tags: - peft - qlora - qualitative-research - open-coding --- # mistral7b QLoRA Open-Coding Adapter This PEFT adapter fine-tunes `mistralai/Mistral-7B-Instruct-v0.2` to produce exactly one concise open code for an input utterance or qualitative text segment. ## Output schema Task mode: `single_code`. ```json {"code": "short analytical label"} ``` ## Held-out verification - Rows: 100 - Valid JSON rate: 1.000 - Non-empty rate: 1.000 - Exact set match: 0.200 - Mean set F1: 0.200 - Average generated codes: 1.000 - Verification passed: True Exact match is reported as a format and regression diagnostic, not as a complete measure of open-code quality. Valid abstractive labels may differ in wording. ## Loading ```python from peft import PeftModel from transformers import AutoModelForCausalLM, AutoTokenizer base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2") tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2") model = PeftModel.from_pretrained(base_model, "Likich/open-coding-mistral7b-single_code-qlora") ``` The repository contains adapter weights, tokenizer metadata, training metadata, held-out verification metrics, and sample predictions. It does not contain the full base-model weights.