Downloads · 30 days
85
24% of all-time downloads
Intel/qwen3.5-2b-vlm-weld-explainability-lora
qwen3.5-2b-vlm-weld-explainability-lora is a image-text-to-text model from Intel. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter fine-tuned on top of unsloth/Qwen3.5-2B to provide explainable weld defect analysis. Given a weld image and accompanying sensor telemetry (weld current, voltage, pressure, CO2 flow, feed rate, wire cons…
Downloads · 30 days
85
24% of all-time downloads
All-time downloads
355
Public
Repo size
596 MB
Likes
3
Public
Click a slice to open those files.
.pt185 MB · 62%
From the Hugging Face model README
A LoRA adapter fine-tuned on top of unsloth/Qwen3.5-2B to provide explainable weld defect analysis.
Given a weld image and accompanying sensor telemetry (weld current, voltage, pressure, CO2 flow, feed rate, wire consumed), the model produces a structured report: weld quality classification (1 of 12 classes), visual observation, sensor analysis, model confidence, defect probability, severity, root cause, and corrective actions.
This is a PEFT/LoRA adapter fine-tuned from the unsloth/Qwen3.5-2B vision-language base model, trained on the IntelLabs/Intel_Robotic_Welding_Multimodal_Dataset (gated, publicly accessible dataset). Given a weld image paired with a natural-language prompt containing sensor telemetry, the model returns a structured, human-readable explainability report covering:
The adapter is intended to be served alongside the base model (e.g., via vLLM with --enable-lora) rather than used standalone.
For direct use of how this fine tuned LoRA adapter is being used, one can refer to link
Load the base model unsloth/Qwen3.5-2B together with this LoRA adapter and query it with a weld image plus a text prompt that includes sensor telemetry (e.g., primary weld current, secondary weld voltage, pressure, CO2 weld flow, feed rate, wire consumed). The model returns a structured weld quality report for use by weld inspectors, quality engineers, and robotic welding operators as a decision-support / explainability aid — it is not intended to autonomously accept/reject welds without human review.
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
Use the code below to get started with the model. The example below serves the base model with the LoRA adapter via vLLM and queries it through an OpenAI-compatible client. Replace the image path and sensor telemetry with your own data.
Serve with vLLM Docker (base model + LoRA adapter):
$> docker run -t -d \
--shm-size 4g \
--net=host \
--ipc=host \
--privileged \
-v /dev/dri/by-path:/dev/dri/by-path \
-v /path/.cache/huggingface:/root/.cache/huggingface \
-v /fine-tuning:/fine-tuning \
--name=vllm-server \
--device /dev/dri:/dev/dri \
--entrypoint=/bin/bash \
intel/vllm:0.21.0-ubuntu24.04-20260625
$> docker exec -it vllm-server bash
$> VLLM_WORKER_MULTIPROC_METHOD=spawn vllm serve unsloth/Qwen3.5-2B \
--dtype=float16 \
--enforce-eager \
--port 8005 \
--block-size 32 \
--gpu-memory-utilization 0.182 \
--no-enable-prefix-caching \
--trust-remote-code \
--max-num-batched-tokens=8192 \
--max-model-len 8192 \
--served-model-name unsloth/Qwen3.5-2B \
--enable-lora \
--lora-modules qwen3.5-2b-adapter=/fine-tuning/qwen_3.5_2b_adapter/checkpoint/ \
-tp=1 \
--quantization fp8 \
--attention-backend TRITON_ATTN
Query with an OpenAI-compatible client:
import base64
from openai import OpenAI
client = OpenAI(
api_key="sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
base_url="http://<HOST>:8005/v1"
)
def encode_image(path):
with open(path, "rb") as f:
return base64.b64encode(f.read()).decode("utf-8")
b64_image = encode_image("path/to/weld_image.jpg")
messages = [
{
"role": "system",
"content": [{
"type": "text",
"text": (
"You are an expert weld quality inspector and metallurgical engineer "
"with deep knowledge of MIG/MAG/TIG arc welding processes and industrial "
"weld defect analysis per AWS D1.1 and ISO 5817 standards. When shown a "
"weld image alongside time-series sensor readings, classify the weld "
"quality, identify any defect type, explain the root cause using sensor "
"evidence, assess severity, and recommend corrective actions."
),
}],
},
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{b64_image}"}},
{
"type": "text",
"text": (
"Given this weld image and the sensor telemetry, produce a structured "
"weld quality report covering defect classification, root cause, and "
"remediation steps.\nSensor Data:\n"
" • Primary Weld Current: <value> A\n"
" • Secondary Weld Voltage: <value> V\n"
" • Pressure: <value> bar\n"
" • CO2 Weld Flow: <value> L/min\n"
" • Feed: <value> mm/min\n"
" • Wire Consumed: <value> mm"
),
},
],
},
]
response = client.chat.completions.create(
model="qwen3.5-2b-adapter", # alias set in vLLM docker serve.
messages=messages,
max_tokens=2048,
temperature=1.5,
extra_body={"min_p": 0.1},
)
print(response)
Example (illustrative placeholder) output format:
Weld Classification: <one of 12 defect classes>
Visual Observation: <description of what is visually apparent in the image>
Sensor Analysis: <interpretation of the provided telemetry values>
Model Confidence: <confidence score>
Defect Probability: <probability score>
Severity: <low / medium / high>
Root Cause: <inferred cause based on visual + sensor evidence>
Corrective Actions: <recommended remediation steps>
(A real sample image, prompt, and generated output will be added here once available.)
IntelLabs/Intel_Robotic_Welding_Multimodal_Dataset — a gated (but publicly accessible upon request) multimodal dataset pairing robotic weld images with time-series sensor telemetry (weld current, voltage, pressure, CO2 flow, feed rate, wire consumed) across 12 weld quality/defect classes, along with conversational (system/user/assistant) annotations used for supervised fine-tuning.
Fine-tuned using Unsloth's FastVisionModel with 4-bit quantized loading and gradient checkpointing, wrapped with a trl.SFTTrainer / SFTConfig supervised fine-tuning loop. LoRA was applied to vision layers, language layers, attention modules, and MLP modules.
load_in_4bit=True) with LoRA adapter trained in default (non-mixed) precision via Unsloth/TRL; inference server uses float16. <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->adamw_torch on CPU/XPU; adamw_8bit on CUDA), weight_decay=0.001Check if this number needs to be published
--enable-lora)Formal evaluation results (accuracy/F1 on the 12 weld defect classes, qualitative review of generated explanations, etc.) are to be added.
LoRA adapter (r=16, alpha=16) applied to the vision, language, attention, and MLP modules of the unsloth/Qwen3.5-2B vision-language model, trained with a supervised fine-tuning (next-token prediction on assistant responses) objective to produce structured weld-defect explainability reports from image + sensor-telemetry-augmented text prompts.
FastVisionModel, UnslothVisionDataCollator)SFTTrainer, SFTConfig)transformers--enable-lora