Quality Management Compliance Analyzer LoRA โ€” Llama 3.2 3B

This is a LoRA adapter fine-tuned on 1,000,000 synthetic instruction-style samples covering quality-management compliance analysis against ISO standards.

Completed by Aboutknowledge (Hong Kong) Limited โ€” Alex Lee.

License note: the LoRA weights in this repository are released under the same terms as the base model, the Llama 3.2 Community License Agreement. Please review Meta's license before using or redistributing the merged weights.

Model details

Item Value
Base model unsloth/Llama-3.2-3B-Instruct-bnb-4bit
Fine-tuning framework Unsloth
LoRA rank (r) 16
LoRA alpha 16
LoRA dropout 0.0
Quantized training 4-bit NF4 (bnb)
Training records 1,000,000
Training steps 3,000
Final train loss 0.1742
Sequence length 2048

Included files

  • adapter_model.safetensors / adapter_config.json โ€” standard PEFT LoRA adapter.
  • compliance_analyzer_v2.q8_0.gguf โ€” Q8_0 GGUF file ready for Ollama.
  • Modelfile โ€” example Ollama Modelfile (edit the FROM path after downloading).

Use with transformers / Unsloth

from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="unsloth/Llama-3.2-3B-Instruct-bnb-4bit",
    max_seq_length=2048,
    dtype=None,
    load_in_4bit=True,
)
model = FastLanguageModel.get_peft_model(model, r=16, lora_alpha=16)
model.load_adapter("alexlkc28/compliance-analyzer-llama32-3b-v2", adapter_name="default")

messages = [
    {"role": "system", "content": "You are an expert quality-management auditor and ISO standards consultant. Analyze the user's statement for compliance with relevant ISO/quality-management requirements. Provide a verdict (compliant, partially_compliant, or non_compliant), cite the relevant clause(s), explain your reasoning, and list actionable recommendations."},
    {"role": "user", "content": "We do not document management review meetings."},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", tokenize=True).to("cuda")
outputs = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Use with Ollama

  1. Download the GGUF and Modelfile from this repo.
  2. Update the FROM line in the Modelfile to point to the downloaded GGUF path.
  3. Create the model:
ollama create compliance-analyzer-v2 -f /path/to/Modelfile
ollama run compliance-analyzer-v2

Training data

The data was generated synthetically from a compact ISO/quality-management knowledge base covering:

  • ISO 9001, 14001, 45001, 27001, 13485, 50001
  • IATF 16949 (automotive), AS9100D (aerospace)
  • Compliance verdicts: compliant, partially_compliant, non_compliant
  • Structured output: verdict, cited clause(s), explanation, recommendations

The full 1,000,000-record dataset is available locally in the project directory as data/compliance_1m_chat.jsonl.

Limitations

  • Synthetic data can contain occasional grammar artifacts or mix standards in generic answers; always verify against the official standard text for compliance decisions.
  • This is a 3B model; while useful for drafting and triage, it should not replace human auditors or regulatory review.
Downloads last month
9
GGUF
Model size
3B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for alexlkc28/compliance-analyzer-llama32-3b-v2