Mistral-7B VAA General QLoRA Adapter

LoRA adapter fine-tuned on Mistral-7B-Instruct-v0.3 for Lean Value-Adding Analysis (VAA) in Business Process Management (BPM). The model classifies process activities as Value-Adding (VA), Business Value-Adding (BVA), or Non-Value-Adding (NVA).

This repository contains adapter weights only (approximately 160 MB). The base model must also be downloaded to run inference.

Quick Start

Requirements

  • NVIDIA GPU with approximately 8โ€“12 GB VRAM as a practical starting point for 4-bit inference; actual requirements may vary.
  • Hugging Face account with access to Mistral-7B-Instruct-v0.3.
  • Python, PyTorch with CUDA support, Transformers, PEFT, bitsandbytes, and Accelerate.

Install dependencies:

pip install torch transformers peft bitsandbytes accelerate

Authenticate with Hugging Face if required:

hf auth login

Inference Example

import torch
from peft import PeftModel
from transformers import (
    AutoModelForCausalLM,
    AutoTokenizer,
    BitsAndBytesConfig,
)

base_id = "mistralai/Mistral-7B-Instruct-v0.3"
adapter_id = "ridoley/mistral7b-vaa-general-qlora"

bnb = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16,
)

tokenizer = AutoTokenizer.from_pretrained(base_id)

base = AutoModelForCausalLM.from_pretrained(
    base_id,
    quantization_config=bnb,
    device_map="auto",
)

model = PeftModel.from_pretrained(base, adapter_id)
model.eval()

messages = [
    {
        "role": "system",
        "content": (
            "You are a Lean and BPM expert. Classify all process activities "
            "as VA, BVA, or NVA. Return only valid JSON with keys "
            "process_name and activities. Each activity should include "
            "activity_name, label, waste_type, and justification."
        ),
    },
    {
        "role": "user",
        "content": (
            "Process Name: Goods Delivery Process\n"
            "1. Receive shipping order document\n"
            "2. Receive goods from customer\n"
            "3. Deliver goods to customer address\n"
            "Classify all activities. Return JSON only."
        ),
    },
]

prompt = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.inference_mode():
    output = model.generate(
        **inputs,
        max_new_tokens=512,
        do_sample=False,
    )

generated_tokens = output[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(generated_tokens, skip_special_tokens=True))

Overall Performance

Evaluated on a test set of 253 real-world business-process activities, the fine-tuned adapter achieved 79.05% accuracy and a 76.86% Macro F1-score.

Model Accuracy Macro F1
Mistral-7B-Instruct-v0.3 (base) 68.38% 58.12%
Gemini 2.5 Flash Lite 66.01% 63.08%
Llama 3.3 70B 69.17% 67.19%
Mistral-7B-Instruct-v0.3 + QLoRA 79.05% 76.86%

Compared with the base Mistral model, the fine-tuned adapter improved Macro F1 by 18.74 percentage points and accuracy by 10.67 percentage points.

These results apply to the reported test set. Performance may vary across datasets and business-process domains.

Adapter Configuration

Setting Value
Fine-tuning method QLoRA (4-bit NF4) + LoRA
Rank r 16
LoRA alpha 32
Dropout 0.05
Target modules q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj

Labels

  • VA โ€” Value-Adding: Directly contributes to the customer-requested outcome.
  • BVA โ€” Business Value-Adding: Required for business, regulatory, control, or operational reasons.
  • NVA โ€” Non-Value-Adding: Activity considered wasteful in the VAA framework. For NVA activities, the model predicts a Lean waste type using the TIMWOODS categories. The waste_type field is left empty for VA/BVA.

Paper and Citation

The methodology and evaluation are described in the published paper:

Automating Value-Added Analysis in Business Processes Using a QLoRA Fine-Tuned Small Language Model. IEEE ICISS 2026.

If you use this adapter in academic work, please cite the paper using the official citation metadata from IEEE Xplore.

License

This adapter repository is licensed under Apache-2.0. The base model has its own license and access terms. Review the Mistral-7B-Instruct-v0.3 model card before use.

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

Model tree for ridoley/mistral7b-vaa-general-qlora

Adapter
(897)
this model