CoolFace
Modelpublic

eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes43downloads
Model Card

edgeai-docs-embedding-qwen1.5-0.5b-instruct

A lightweight LoRA adapter fine-tuned on 1,794 Edge Impulse / Edge AI MDX documentation files from the Edge Impulse documentation, built on top of `Qwen/Qwen1.5-0.5B`.

Optimized for:

  • answering developer questions about Edge Impulse Studio, SDKs, APIs, and tooling
  • summarizing technical documentation and tutorials
  • generating code snippets for edge ML workflows
  • lightweight local/edge deployment with PEFT adapters
Larger variants in training: 1.5B · 7B (Qwen2.5-Coder base)

Model Summary

edgeai-docs-embedding-qwen1.5-0.5b-instruct is a PEFT LoRA adapter trained for documentation-focused text generation and conversational support over Edge Impulse / Edge AI knowledge.

Use cases

  • Documentation Q&A for Edge Impulse developers
  • Technical explanation of Studio workflows, SDK usage, and hardware deployment
  • Generating sample code for API, CLI, and Python SDK integrations
  • Retrieval-augmented generation (RAG) over Edge AI docs

Model Details

PropertyValue
Base modelQwen/Qwen1.5-0.5B
Adapter typeLoRA (PEFT)
LoRA rank (r)8
LoRA alpha32
Target modulesq_proj, v_proj
Task typeCAUSAL_LM
Trainable parameters~786K (0.17% of base)
Training epochs3
Batch size4 (× grad accum 2 = effective 8)
Learning rate3e-4
Max sequence length512 tokens
Training hardwareApple M1 Pro (MPS, fp16)
Precisionfloat16

Training Data

StatValue
SourceEdge Impulse documentation
File formatMDX (Markdown + JSX components)
Total files1,794 .mdx files
PreprocessingStripped frontmatter, imports, JSX tags; unwrapped code fences; flattened links
Chunk size512 tokens

Topics covered: Studio projects, datasets, data ingestion, DSP and transformation blocks, learning and processing blocks, model deployment, Python SDK, REST API, CLI tools, and edge inference.


Evaluation

QA evaluation

  • Dataset: 5 fixed developer-style prompts
  • Base avg keyword count: 8.2
  • Adapter avg keyword count: 6.8
  • Code snippet presence: 5/5 for both base and adapter

Perplexity on Edge AI samples

  • Test corpus: 30 sample Edge AI documentation files
  • Base mean perplexity: 11.53
  • Adapter mean perplexity: 12.02
  • Adapter wins: 4 / 30 documents
These metrics are from small validation samples and should be interpreted as a lightweight benchmark rather than a full production evaluation.

Tutorials


Usage

Load with PEFT

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

BASE_MODEL = "Qwen/Qwen1.5-0.5B"
ADAPTER = "eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct"

device = "cuda" if torch.cuda.is_available() else ("mps" if torch.backends.mps.is_available() else "cpu")

tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
base_model = AutoModelForCausalLM.from_pretrained(
    BASE_MODEL,
    torch_dtype=torch.float16 if device != "cpu" else torch.float32,
    device_map=device,
)
model = PeftModel.from_pretrained(base_model, ADAPTER)
model.eval()

Text generation pipeline

python
from transformers import pipeline

pipe = pipeline("text-generation", model="eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct")
print(pipe([{"role": "user", "content": "How do I use the Edge Impulse Python SDK to upload data?"}]))

Example prompts

TaskPrompt
Concept explanationWhat is a DSP block in Edge Impulse?
API usageHow do I use the Edge Impulse Python SDK to upload data?
DeploymentHow do I deploy a model to an Arduino Nano 33 BLE Sense?
Code generationWrite Python code to collect IMU data and upload it to Edge Impulse.
TroubleshootingWhy is my Edge Impulse model showing high latency?

Limitations

  • Based on a 0.5B base model — may struggle with long multi-step reasoning
  • Training data covers Edge Impulse docs as of mid-2026; newer features may be missing
  • May hallucinate or fabricate undocumented APIs or block behavior
  • Not validated for safety-critical or production use
  • Validate generated code before deploying on hardware

Related models

ModelBaseStatus
This modelQwen/Qwen1.5-0.5B✅ Available
eoinedge/edgeai-qwen2.5coder-1.5b-loraQwen2.5-Coder-1.5B-Instruct🔄 Training
eoinedge/edgeai-qwen2.5coder-7b-loraQwen2.5-Coder-7B-Instruct🔄 Training
eoinedge/arduino-qwen0.5-loraQwen/Qwen1.5-0.5B✅ Available

Citation

bibtex
@misc{edgeai-docs-embedding-qwen1.5-0.5b-instruct,
  author       = {Jordan, Eoin},
  title        = {edgeai-docs-embedding-qwen1.5-0.5b-instruct},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct}}
}