Text Generation
PEFT
Safetensors
GGUF
English
lora
qwen
edge-ai
edge-impulse
documentation
code-generation
conversational
Instructions to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M # Run inference directly in the terminal: llama cli -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M # Run inference directly in the terminal: llama cli -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Use Docker
docker model run hf.co/eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
- Ollama
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with Ollama:
ollama run hf.co/eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
- Unsloth Desktop
- Pi
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with Docker Model Runner:
docker model run hf.co/eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
- Lemonade
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Run and chat with the model
lemonade run user.edgeai-docs-qwen2.5-coder-0.5b-lora-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Update model card: real training details, LoRA config, usage examples, related models
Browse files
README.md
CHANGED
|
@@ -1,188 +1,166 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model: Qwen/Qwen1.5-0.5B
|
| 3 |
library_name: peft
|
| 4 |
-
pipeline_tag: text-generation
|
| 5 |
-
license: apache-2.0
|
| 6 |
language:
|
| 7 |
-
- en
|
| 8 |
tags:
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
# edgeai-docs-embedding-qwen1.5-0.5b-instruct
|
| 20 |
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
## Model Summary
|
| 28 |
-
|
| 29 |
-
`edgeai-docs-embedding-qwen1.5-0.5b-instruct` is a lightweight, instruction-tuned LoRA adapter built on top of **Qwen1.5-0.5B**.
|
| 30 |
-
It is optimized for:
|
| 31 |
-
|
| 32 |
-
- Documentation summarization
|
| 33 |
-
- Conversational responses
|
| 34 |
-
- Lightweight embedding-style semantic generation
|
| 35 |
-
- Edge and local deployment environments
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
---
|
| 40 |
|
| 41 |
-
# Model Details
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
### Fine-Tuning Method
|
| 60 |
-
LoRA (Low-Rank Adaptation) via PEFT
|
| 61 |
-
|
| 62 |
-
### Framework
|
| 63 |
-
- Hugging Face Transformers
|
| 64 |
-
- PEFT
|
| 65 |
-
- Safetensors
|
| 66 |
-
|
| 67 |
-
### Language
|
| 68 |
-
English
|
| 69 |
-
|
| 70 |
-
### License
|
| 71 |
-
Apache 2.0
|
| 72 |
|
| 73 |
---
|
| 74 |
|
| 75 |
-
#
|
| 76 |
-
|
| 77 |
-
## Direct Use
|
| 78 |
-
|
| 79 |
-
- Developer documentation summarization
|
| 80 |
-
- API explanation generation
|
| 81 |
-
- Conversational assistant for technical workflows
|
| 82 |
-
- Lightweight semantic generation for search/retrieval pipelines
|
| 83 |
-
|
| 84 |
-
## Downstream Use
|
| 85 |
-
|
| 86 |
-
- Integrated into RAG (Retrieval-Augmented Generation) systems
|
| 87 |
-
- Embedded inside edge devices
|
| 88 |
-
- Wrapped within Ollama or llama.cpp inference environments
|
| 89 |
-
- Developer tooling assistants
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
-
|
| 94 |
-
- Legal or medical advisory systems
|
| 95 |
-
- Large-scale multi-lingual production deployments
|
| 96 |
-
- Safety-critical automation
|
| 97 |
|
| 98 |
---
|
| 99 |
|
| 100 |
-
#
|
| 101 |
|
| 102 |
-
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
|
| 109 |
-
|
|
|
|
| 110 |
|
| 111 |
-
|
|
|
|
| 112 |
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
-
##
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
- Manually validated prompt-response pairs
|
| 121 |
|
| 122 |
-
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
-
|
|
|
|
| 125 |
|
| 126 |
-
|
| 127 |
-
- Instruction tuning objective
|
| 128 |
-
- Mixed precision training
|
| 129 |
|
| 130 |
-
|
| 131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
|
| 133 |
-
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
Evaluation was performed using:
|
| 138 |
-
|
| 139 |
-
- Manual prompt benchmarking
|
| 140 |
-
- Structured documentation summarization tests
|
| 141 |
-
- API explanation accuracy review
|
| 142 |
-
|
| 143 |
-
Quantitative benchmarks are limited due to domain-specific fine-tuning focus.
|
| 144 |
|
| 145 |
---
|
| 146 |
|
| 147 |
-
#
|
| 148 |
-
|
| 149 |
-
## Architecture
|
| 150 |
|
| 151 |
-
|
| 152 |
-
-
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
Low-Rank Adaptation (LoRA)
|
| 158 |
|
| 159 |
-
##
|
| 160 |
|
| 161 |
-
-
|
| 162 |
-
-
|
| 163 |
-
-
|
| 164 |
-
-
|
|
|
|
| 165 |
|
| 166 |
---
|
| 167 |
|
| 168 |
-
#
|
| 169 |
|
| 170 |
-
Base
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
|
|
|
| 175 |
|
| 176 |
---
|
| 177 |
|
| 178 |
-
# Citation
|
| 179 |
-
|
| 180 |
-
If you use this model, please cite:
|
| 181 |
|
| 182 |
```bibtex
|
| 183 |
@misc{edgeai-docs-embedding-qwen1.5-0.5b-instruct,
|
| 184 |
-
author
|
| 185 |
-
title
|
| 186 |
-
year
|
|
|
|
| 187 |
howpublished = {\url{https://huggingface.co/eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct}}
|
| 188 |
-
}
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
base_model: Qwen/Qwen1.5-0.5B
|
| 4 |
library_name: peft
|
|
|
|
|
|
|
| 5 |
language:
|
| 6 |
+
- en
|
| 7 |
tags:
|
| 8 |
+
- lora
|
| 9 |
+
- peft
|
| 10 |
+
- qwen
|
| 11 |
+
- edge-ai
|
| 12 |
+
- edge-impulse
|
| 13 |
+
- documentation
|
| 14 |
+
- code-generation
|
| 15 |
+
- conversational
|
| 16 |
+
pipeline_tag: text-generation
|
| 17 |
---
|
| 18 |
|
| 19 |
# edgeai-docs-embedding-qwen1.5-0.5b-instruct
|
| 20 |
|
| 21 |
+
A LoRA adapter fine-tuned on **1,794 Edge Impulse / Edge AI MDX documentation files** from the [Edge Impulse documentation](https://docs.edgeimpulse.com), built on top of [`Qwen/Qwen1.5-0.5B`](https://huggingface.co/Qwen/Qwen1.5-0.5B).
|
| 22 |
|
| 23 |
+
Optimized for:
|
| 24 |
+
- Answering developer questions about Edge Impulse Studio, SDK, and APIs
|
| 25 |
+
- Summarizing technical documentation
|
| 26 |
+
- Generating code snippets for edge ML workflows
|
| 27 |
+
- Lightweight local/edge deployment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
+
> **Larger variants in training:** [1.5B](https://huggingface.co/eoinedge/edgeai-qwen2.5coder-1.5b-lora) · [7B](https://huggingface.co/eoinedge/edgeai-qwen2.5coder-7b-lora) (Qwen2.5-Coder base)
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
+
## Model Details
|
| 34 |
+
|
| 35 |
+
| Property | Value |
|
| 36 |
+
|---|---|
|
| 37 |
+
| Base model | `Qwen/Qwen1.5-0.5B` |
|
| 38 |
+
| Adapter type | LoRA (PEFT) |
|
| 39 |
+
| LoRA rank (`r`) | 8 |
|
| 40 |
+
| LoRA alpha | 32 |
|
| 41 |
+
| Target modules | `q_proj`, `v_proj` |
|
| 42 |
+
| LoRA dropout | 0.05 |
|
| 43 |
+
| Trainable parameters | ~786K (0.17% of base) |
|
| 44 |
+
| Training epochs | 3 |
|
| 45 |
+
| Batch size | 4 (× grad accum 2 = effective 8) |
|
| 46 |
+
| Learning rate | 3e-4 (cosine decay) |
|
| 47 |
+
| Sequence length | 512 tokens |
|
| 48 |
+
| Training hardware | Apple M1 Pro (MPS, fp16) |
|
| 49 |
+
| Precision | float16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
---
|
| 52 |
|
| 53 |
+
## Training Data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
| Stat | Value |
|
| 56 |
+
|---|---|
|
| 57 |
+
| Source | [Edge Impulse Mintlify documentation](https://docs.edgeimpulse.com) |
|
| 58 |
+
| File format | MDX (Markdown + JSX components) |
|
| 59 |
+
| Total files | 1,794 `.mdx` files |
|
| 60 |
+
| Preprocessing | Frontmatter, JSX tags, imports stripped; code fences unwrapped; links flattened |
|
| 61 |
+
| Chunks generated | ~3,500 × 512-token chunks |
|
| 62 |
|
| 63 |
+
Topics covered: Studio projects, datasets, DSP blocks, learning blocks, deployment targets, Python SDK, REST API, CLI tools, edge inference, model optimization, and more.
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
---
|
| 66 |
|
| 67 |
+
## Usage
|
| 68 |
|
| 69 |
+
### Load and chat
|
| 70 |
|
| 71 |
+
```python
|
| 72 |
+
import torch
|
| 73 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 74 |
+
from peft import PeftModel
|
| 75 |
|
| 76 |
+
BASE_MODEL = "Qwen/Qwen1.5-0.5B"
|
| 77 |
+
ADAPTER = "eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct"
|
| 78 |
|
| 79 |
+
device = "cuda" if torch.cuda.is_available() else \
|
| 80 |
+
"mps" if torch.backends.mps.is_available() else "cpu"
|
| 81 |
|
| 82 |
+
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
|
| 83 |
+
base = AutoModelForCausalLM.from_pretrained(BASE_MODEL,
|
| 84 |
+
dtype=torch.float16 if device != "cpu" else torch.float32,
|
| 85 |
+
device_map=device)
|
| 86 |
+
model = PeftModel.from_pretrained(base, ADAPTER)
|
| 87 |
+
model.eval()
|
| 88 |
+
```
|
| 89 |
|
| 90 |
+
### Single question
|
| 91 |
|
| 92 |
+
```python
|
| 93 |
+
prompt = "How do I collect sensor data using the Edge Impulse data forwarder?"
|
| 94 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
|
|
|
| 95 |
|
| 96 |
+
with torch.no_grad():
|
| 97 |
+
out = model.generate(**inputs, max_new_tokens=512,
|
| 98 |
+
do_sample=True, temperature=0.7, top_p=0.95,
|
| 99 |
+
pad_token_id=tokenizer.eos_token_id)
|
| 100 |
|
| 101 |
+
print(tokenizer.decode(out[0], skip_special_tokens=True))
|
| 102 |
+
```
|
| 103 |
|
| 104 |
+
### Chat template (multi-turn)
|
|
|
|
|
|
|
| 105 |
|
| 106 |
+
```python
|
| 107 |
+
messages = [
|
| 108 |
+
{"role": "user", "content": "What is an impulse in Edge Impulse?"}
|
| 109 |
+
]
|
| 110 |
+
formatted = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 111 |
+
inputs = tokenizer(formatted, return_tensors="pt").to(model.device)
|
| 112 |
|
| 113 |
+
with torch.no_grad():
|
| 114 |
+
out = model.generate(**inputs, max_new_tokens=512,
|
| 115 |
+
do_sample=True, temperature=0.7,
|
| 116 |
+
pad_token_id=tokenizer.eos_token_id)
|
| 117 |
|
| 118 |
+
print(tokenizer.decode(out[0], skip_special_tokens=True))
|
| 119 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
|
| 121 |
---
|
| 122 |
|
| 123 |
+
## Example Prompts
|
|
|
|
|
|
|
| 124 |
|
| 125 |
+
| Task | Prompt |
|
| 126 |
+
|---|---|
|
| 127 |
+
| Concept explanation | `"What is a DSP block in Edge Impulse?"` |
|
| 128 |
+
| API usage | `"How do I use the Edge Impulse Python SDK to upload data?"` |
|
| 129 |
+
| Deployment | `"How do I deploy a model to an Arduino Nano 33 BLE Sense?"` |
|
| 130 |
+
| Code generation | `"Write Python code to collect IMU data and upload it to Edge Impulse."` |
|
| 131 |
+
| Troubleshooting | `"Why is my Edge Impulse model showing high latency on the Cortex-M4?"` |
|
| 132 |
|
| 133 |
+
---
|
|
|
|
|
|
|
| 134 |
|
| 135 |
+
## Limitations
|
| 136 |
|
| 137 |
+
- Based on a 0.5B parameter base model — may struggle with complex multi-step reasoning
|
| 138 |
+
- Training data covers documentation as of mid-2026; newer APIs may not be represented
|
| 139 |
+
- May hallucinate undocumented Edge Impulse features
|
| 140 |
+
- Not suitable for safety-critical or production decision-making systems
|
| 141 |
+
- Validate generated code before running on real hardware
|
| 142 |
|
| 143 |
---
|
| 144 |
|
| 145 |
+
## Related Models
|
| 146 |
|
| 147 |
+
| Model | Base | Status |
|
| 148 |
+
|---|---|---|
|
| 149 |
+
| This model | Qwen1.5-0.5B | ✅ Available |
|
| 150 |
+
| [eoinedge/edgeai-qwen2.5coder-1.5b-lora](https://huggingface.co/eoinedge/edgeai-qwen2.5coder-1.5b-lora) | Qwen2.5-Coder-1.5B-Instruct | 🔄 Training |
|
| 151 |
+
| [eoinedge/edgeai-qwen2.5coder-7b-lora](https://huggingface.co/eoinedge/edgeai-qwen2.5coder-7b-lora) | Qwen2.5-Coder-7B-Instruct | 🔄 Training |
|
| 152 |
+
| [eoinedge/arduino-qwen0.5-lora](https://huggingface.co/eoinedge/arduino-qwen0.5-lora) | Qwen1.5-0.5B | ✅ Available (Arduino docs) |
|
| 153 |
|
| 154 |
---
|
| 155 |
|
| 156 |
+
## Citation
|
|
|
|
|
|
|
| 157 |
|
| 158 |
```bibtex
|
| 159 |
@misc{edgeai-docs-embedding-qwen1.5-0.5b-instruct,
|
| 160 |
+
author = {Jordan, Eoin},
|
| 161 |
+
title = {edgeai-docs-embedding-qwen1.5-0.5b-instruct},
|
| 162 |
+
year = {2026},
|
| 163 |
+
publisher = {Hugging Face},
|
| 164 |
howpublished = {\url{https://huggingface.co/eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct}}
|
| 165 |
+
}
|
| 166 |
+
```
|