Model Card for ArduiWire-0.5B πŸ”ŒπŸ€–

ArduiWire-0.5B is a specialized, lightweight Small Language Model (SLM) based on Qwen 2.5 (0.5B), fine-tuned using LoRA (Parameter-Efficient Fine-Tuning).

It is specifically designed for makers, students, and embedded systems engineers who need instant physical wiring layouts and clean Arduino C++ firmware with zero conversational filler (zero-yapping).


Model Details

  • Developed by: wsaefulloh
  • Model Type: Causal Language Model (LoRA Adapter / PEFT)
  • Base Model: Qwen/Qwen2.5-0.5B-Instruct
  • Language(s): English, Indonesian
  • License: Apache 2.0 (Permissive open-source)
  • Primary Domain: Arduino Uno physical pinout mapping (ASCII) & clean C++ code generation

Key Features

  1. πŸ“ ASCII Wiring Diagrams: Accurately maps physical component pins to Arduino Uno headers in a clean, human-readable ASCII layout.
  2. ⚑ Clean, Compilation-Ready C++ Code: Outputs minimalist Arduino C++ code that is ready to compile in PlatformIO or the Arduino IDE.
  3. 🚫 Zero Yapping: Completely eliminates pleasantries, greetings, and boilerplate explanations, delivering strictly the technical information required.

Before vs. After Fine-Tuning

Benchmark Prompt:

"How do I connect the HC-SR04 ultrasonic sensor to an Arduino Uno?"

πŸ”΄ Before (Base Qwen 2.5 0.5B) 🟒 After (ArduiWire-0.5B)
Overly verbose conversational filler.
❌ No physical wiring diagram.
❌ Hallucinated non-existent libraries (Adafruit_Sensor::UltrasonicSensor).
Direct and strictly technical.
βœ… Clean ASCII wiring diagram mapping VCC, GND, TRIG (D9), ECHO (D10).
βœ… Standard C++ code ready to compile with no erroneous dependencies.

Real Output Example:

[ HC-SR04 ]          [ Arduino Uno ]
   VCC     -------->       5V
   GND     -------->       GND
   TRIG    -------->       Pin D9
   ECHO    -------->       Pin D10
const int trigPin = 9, echoPin = 10;
void setup() {
  Serial.begin(9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
}
void loop() {
  digitalWrite(trigPin, LOW); delayMicroseconds(2);
  digitalWrite(trigPin, HIGH); delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  long d = pulseIn(echoPin, HIGH);
  Serial.println(d * 0.034 / 2.0);
  delay(500);
}

How to Get Started with the Model

Run this model locally using the transformers and peft libraries:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
adapter_id = "wsaefulloh/ArduiWire-0.5B"

tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
    base_model_id,
    torch_dtype=torch.float16,
    device_map="auto"
)
model = PeftModel.from_pretrained(base_model, adapter_id)

messages = [
    {
        "role": "system",
        "content": "You are a microcontroller wiring assistant. Your response MUST consist of 2 sections: A concise ASCII wiring diagram, followed by clean, comment-minimal Arduino C++ code without conversational filler."
    },
    {
        "role": "user",
        "content": "How do I connect an active buzzer to an Arduino Uno to produce a beep?"
    }
]

prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to("cuda" if torch.cuda.is_available() else "cpu")

outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.1)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for wsaefulloh/ArduiWire-0.5B

Adapter
(878)
this model