eoinedge commited on
Commit
a735a51
Β·
verified Β·
1 Parent(s): 18fc661

Remove generated documentation block

Browse files
Files changed (1) hide show
  1. README.md +187 -210
README.md CHANGED
@@ -1,210 +1,187 @@
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
- widget:
18
- - text: "How can I deploy an Edge Impulse model to an Arduino device?"
19
- example_title: "Edge AI deployment"
20
- space: eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct-space
21
- ---
22
-
23
- # edgeai-docs-embedding-qwen1.5-0.5b-instruct
24
-
25
- A lightweight 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).
26
-
27
- Optimized for:
28
- - answering developer questions about Edge Impulse Studio, SDKs, APIs, and tooling
29
- - summarizing technical documentation and tutorials
30
- - generating code snippets for edge ML workflows
31
- - lightweight local/edge deployment with PEFT adapters
32
-
33
- > **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)
34
-
35
- ---
36
-
37
- ## Model Summary
38
-
39
- `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.
40
-
41
- ### Use cases
42
- - Documentation Q&A for Edge Impulse developers
43
- - Technical explanation of Studio workflows, SDK usage, and hardware deployment
44
- - Generating sample code for API, CLI, and Python SDK integrations
45
- - Retrieval-augmented generation (RAG) over Edge AI docs
46
-
47
- ---
48
-
49
- ## Model Details
50
-
51
- | Property | Value |
52
- |---|---|
53
- | Base model | `Qwen/Qwen1.5-0.5B` |
54
- | Adapter type | LoRA (PEFT) |
55
- | LoRA rank (`r`) | 8 |
56
- | LoRA alpha | 32 |
57
- | Target modules | `q_proj`, `v_proj` |
58
- | Task type | CAUSAL_LM |
59
- | Trainable parameters | ~786K (0.17% of base) |
60
- | Training epochs | 3 |
61
- | Batch size | 4 (Γ— grad accum 2 = effective 8) |
62
- | Learning rate | 3e-4 |
63
- | Max sequence length | 512 tokens |
64
- | Training hardware | Apple M1 Pro (MPS, fp16) |
65
- | Precision | float16 |
66
-
67
- ---
68
-
69
- ## Training Data
70
-
71
- | Stat | Value |
72
- |---|---|
73
- | Source | [Edge Impulse documentation](https://docs.edgeimpulse.com) |
74
- | File format | MDX (Markdown + JSX components) |
75
- | Total files | 1,794 `.mdx` files |
76
- | Preprocessing | Stripped frontmatter, imports, JSX tags; unwrapped code fences; flattened links |
77
- | Chunk size | 512 tokens |
78
-
79
- 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.
80
-
81
- ---
82
-
83
- ## Evaluation
84
-
85
- ### QA evaluation
86
- - Dataset: 5 fixed developer-style prompts
87
- - Base avg keyword count: **8.2**
88
- - Adapter avg keyword count: **6.8**
89
- - Code snippet presence: **5/5** for both base and adapter
90
-
91
- ### Perplexity on Edge AI samples
92
- - Test corpus: 30 sample Edge AI documentation files
93
- - Base mean perplexity: **11.53**
94
- - Adapter mean perplexity: **12.02**
95
- - Adapter wins: **4 / 30 documents**
96
-
97
- > These metrics are from small validation samples and should be interpreted as a lightweight benchmark rather than a full production evaluation.
98
-
99
- ---
100
-
101
- ## Tutorials
102
-
103
- - [Offline SLMs for Edge AI Development β€” Part 1: Qwen LoRA Adapter Fine-Tuned on Edge Impulse Docs](https://docs.edgeimpulse.com/projects/expert-network/integrating-slms-on-linux)
104
- - [Offline SLMs for Edge AI Development β€” Part 2: RAG as an Enhancement for Fine-Tuned Models with FAISS](https://docs.edgeimpulse.com/projects/expert-network/rag-docs-assistant-faiss-qwen)
105
- - [Offline SLMs for Edge AI Development β€” Part 3: Agentic Coding with an Arduino Fine-Tuned Adapter via llama.cpp and OpenCode](https://docs.edgeimpulse.com/projects/expert-network/opencode-offline-coding-assistant)
106
-
107
- ---
108
-
109
- ## Usage
110
-
111
- ### Load with PEFT
112
-
113
- ```python
114
- from transformers import AutoModelForCausalLM, AutoTokenizer
115
- from peft import PeftModel
116
- import torch
117
-
118
- BASE_MODEL = "Qwen/Qwen1.5-0.5B"
119
- ADAPTER = "eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct"
120
-
121
- device = "cuda" if torch.cuda.is_available() else ("mps" if torch.backends.mps.is_available() else "cpu")
122
-
123
- tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
124
- base_model = AutoModelForCausalLM.from_pretrained(
125
- BASE_MODEL,
126
- torch_dtype=torch.float16 if device != "cpu" else torch.float32,
127
- device_map=device,
128
- )
129
- model = PeftModel.from_pretrained(base_model, ADAPTER)
130
- model.eval()
131
- ```
132
-
133
- ### Text generation pipeline
134
-
135
- ```python
136
- from transformers import pipeline
137
-
138
- pipe = pipeline("text-generation", model="eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct")
139
- print(pipe([{"role": "user", "content": "How do I use the Edge Impulse Python SDK to upload data?"}]))
140
- ```
141
-
142
- ---
143
-
144
- ## Example prompts
145
-
146
- | Task | Prompt |
147
- |---|---|
148
- | Concept explanation | `What is a DSP block in Edge Impulse?` |
149
- | API usage | `How do I use the Edge Impulse Python SDK to upload data?` |
150
- | Deployment | `How do I deploy a model to an Arduino Nano 33 BLE Sense?` |
151
- | Code generation | `Write Python code to collect IMU data and upload it to Edge Impulse.` |
152
- | Troubleshooting | `Why is my Edge Impulse model showing high latency?` |
153
-
154
- ---
155
-
156
- ## Limitations
157
-
158
- - Based on a 0.5B base model β€” may struggle with long multi-step reasoning
159
- - Training data covers Edge Impulse docs as of mid-2026; newer features may be missing
160
- - May hallucinate or fabricate undocumented APIs or block behavior
161
- - Not validated for safety-critical or production use
162
- - Validate generated code before deploying on hardware
163
-
164
- ---
165
-
166
- ## Related models
167
-
168
- | Model | Base | Status |
169
- |---|---|---|
170
- | This model | Qwen/Qwen1.5-0.5B | βœ… Available |
171
- | [eoinedge/edgeai-qwen2.5coder-1.5b-lora](https://huggingface.co/eoinedge/edgeai-qwen2.5coder-1.5b-lora) | Qwen2.5-Coder-1.5B-Instruct | πŸ”„ Training |
172
- | [eoinedge/edgeai-qwen2.5coder-7b-lora](https://huggingface.co/eoinedge/edgeai-qwen2.5coder-7b-lora) | Qwen2.5-Coder-7B-Instruct | πŸ”„ Training |
173
- | [eoinedge/arduino-qwen0.5-lora](https://huggingface.co/eoinedge/arduino-qwen0.5-lora) | Qwen/Qwen1.5-0.5B | βœ… Available |
174
-
175
- ---
176
-
177
- ## Citation
178
-
179
- ```bibtex
180
- @misc{edgeai-docs-embedding-qwen1.5-0.5b-instruct,
181
- author = {Jordan, Eoin},
182
- title = {edgeai-docs-embedding-qwen1.5-0.5b-instruct},
183
- year = {2026},
184
- publisher = {Hugging Face},
185
- howpublished = {\url{https://huggingface.co/eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct}}
186
- }
187
- ```
188
-
189
- <!-- portfolio-card-standard:v1 -->
190
- ## Provenance and maintenance
191
-
192
- This standardized block is maintained from a versioned local snapshot. It separates declared evidence from gaps that still require source documentation.
193
-
194
- | Field | Recorded value |
195
- | --- | --- |
196
- | Hugging Face asset | [eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora](https://huggingface.co/eoinedge/edgeai-docs-qwen2.5-coder-0.5b-lora) (model) |
197
- | Snapshot revision | `5d5d65a115937999aed51e771913721ed1aaab03` |
198
- | Snapshot location | `backups/huggingface/20260624T153725Z/models/eoinedge--edgeai-docs-qwen2.5-coder-0.5b-lora/` |
199
- | Last remote modification captured | `2026-05-16 17:21:57+00:00` |
200
- | Declared license | apache-2.0 |
201
- | Prior-card references | <https://docs.edgeimpulse.com>, <https://huggingface.co/Qwen/Qwen1.5-0.5B>, <https://huggingface.co/eoinedge/edgeai-qwen2.5coder-1.5b-lora>, <https://huggingface.co/eoinedge/edgeai-qwen2.5coder-7b-lora>, <https://docs.edgeimpulse.com/projects/expert-network/integrating-slms-on-linux>, <https://docs.edgeimpulse.com/projects/expert-network/rag-docs-assistant-faiss-qwen>, <https://docs.edgeimpulse.com/projects/expert-network/opencode-offline-coding-assistant>, <https://huggingface.co/eoinedge/arduino-qwen0.5-lora>, <https://huggingface.co/eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct}}> |
202
-
203
- ### Model lineage
204
-
205
- | Field | Recorded value |
206
- | --- | --- |
207
- | Base model | Qwen/Qwen2.5-Coder-0.5B-Instruct |
208
- | Training data | Not declared in a machine-readable source β€” add exact dataset revision(s), split(s), and license(s). |
209
- | Training method and code | Not declared in a machine-readable source β€” add recipe, hyperparameters, hardware, and source commit. |
210
- | Evaluation | Not declared in a machine-readable source β€” add metrics, evaluation data, and limitations. |
 
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
+ widget:
18
+ - text: "How can I deploy an Edge Impulse model to an Arduino device?"
19
+ example_title: "Edge AI deployment"
20
+ space: eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct-space
21
+ ---
22
+
23
+ # edgeai-docs-embedding-qwen1.5-0.5b-instruct
24
+
25
+ A lightweight 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).
26
+
27
+ Optimized for:
28
+ - answering developer questions about Edge Impulse Studio, SDKs, APIs, and tooling
29
+ - summarizing technical documentation and tutorials
30
+ - generating code snippets for edge ML workflows
31
+ - lightweight local/edge deployment with PEFT adapters
32
+
33
+ > **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)
34
+
35
+ ---
36
+
37
+ ## Model Summary
38
+
39
+ `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.
40
+
41
+ ### Use cases
42
+ - Documentation Q&A for Edge Impulse developers
43
+ - Technical explanation of Studio workflows, SDK usage, and hardware deployment
44
+ - Generating sample code for API, CLI, and Python SDK integrations
45
+ - Retrieval-augmented generation (RAG) over Edge AI docs
46
+
47
+ ---
48
+
49
+ ## Model Details
50
+
51
+ | Property | Value |
52
+ |---|---|
53
+ | Base model | `Qwen/Qwen1.5-0.5B` |
54
+ | Adapter type | LoRA (PEFT) |
55
+ | LoRA rank (`r`) | 8 |
56
+ | LoRA alpha | 32 |
57
+ | Target modules | `q_proj`, `v_proj` |
58
+ | Task type | CAUSAL_LM |
59
+ | Trainable parameters | ~786K (0.17% of base) |
60
+ | Training epochs | 3 |
61
+ | Batch size | 4 (Γ— grad accum 2 = effective 8) |
62
+ | Learning rate | 3e-4 |
63
+ | Max sequence length | 512 tokens |
64
+ | Training hardware | Apple M1 Pro (MPS, fp16) |
65
+ | Precision | float16 |
66
+
67
+ ---
68
+
69
+ ## Training Data
70
+
71
+ | Stat | Value |
72
+ |---|---|
73
+ | Source | [Edge Impulse documentation](https://docs.edgeimpulse.com) |
74
+ | File format | MDX (Markdown + JSX components) |
75
+ | Total files | 1,794 `.mdx` files |
76
+ | Preprocessing | Stripped frontmatter, imports, JSX tags; unwrapped code fences; flattened links |
77
+ | Chunk size | 512 tokens |
78
+
79
+ 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.
80
+
81
+ ---
82
+
83
+ ## Evaluation
84
+
85
+ ### QA evaluation
86
+ - Dataset: 5 fixed developer-style prompts
87
+ - Base avg keyword count: **8.2**
88
+ - Adapter avg keyword count: **6.8**
89
+ - Code snippet presence: **5/5** for both base and adapter
90
+
91
+ ### Perplexity on Edge AI samples
92
+ - Test corpus: 30 sample Edge AI documentation files
93
+ - Base mean perplexity: **11.53**
94
+ - Adapter mean perplexity: **12.02**
95
+ - Adapter wins: **4 / 30 documents**
96
+
97
+ > These metrics are from small validation samples and should be interpreted as a lightweight benchmark rather than a full production evaluation.
98
+
99
+ ---
100
+
101
+ ## Tutorials
102
+
103
+ - [Offline SLMs for Edge AI Development β€” Part 1: Qwen LoRA Adapter Fine-Tuned on Edge Impulse Docs](https://docs.edgeimpulse.com/projects/expert-network/integrating-slms-on-linux)
104
+ - [Offline SLMs for Edge AI Development β€” Part 2: RAG as an Enhancement for Fine-Tuned Models with FAISS](https://docs.edgeimpulse.com/projects/expert-network/rag-docs-assistant-faiss-qwen)
105
+ - [Offline SLMs for Edge AI Development β€” Part 3: Agentic Coding with an Arduino Fine-Tuned Adapter via llama.cpp and OpenCode](https://docs.edgeimpulse.com/projects/expert-network/opencode-offline-coding-assistant)
106
+
107
+ ---
108
+
109
+ ## Usage
110
+
111
+ ### Load with PEFT
112
+
113
+ ```python
114
+ from transformers import AutoModelForCausalLM, AutoTokenizer
115
+ from peft import PeftModel
116
+ import torch
117
+
118
+ BASE_MODEL = "Qwen/Qwen1.5-0.5B"
119
+ ADAPTER = "eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct"
120
+
121
+ device = "cuda" if torch.cuda.is_available() else ("mps" if torch.backends.mps.is_available() else "cpu")
122
+
123
+ tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
124
+ base_model = AutoModelForCausalLM.from_pretrained(
125
+ BASE_MODEL,
126
+ torch_dtype=torch.float16 if device != "cpu" else torch.float32,
127
+ device_map=device,
128
+ )
129
+ model = PeftModel.from_pretrained(base_model, ADAPTER)
130
+ model.eval()
131
+ ```
132
+
133
+ ### Text generation pipeline
134
+
135
+ ```python
136
+ from transformers import pipeline
137
+
138
+ pipe = pipeline("text-generation", model="eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct")
139
+ print(pipe([{"role": "user", "content": "How do I use the Edge Impulse Python SDK to upload data?"}]))
140
+ ```
141
+
142
+ ---
143
+
144
+ ## Example prompts
145
+
146
+ | Task | Prompt |
147
+ |---|---|
148
+ | Concept explanation | `What is a DSP block in Edge Impulse?` |
149
+ | API usage | `How do I use the Edge Impulse Python SDK to upload data?` |
150
+ | Deployment | `How do I deploy a model to an Arduino Nano 33 BLE Sense?` |
151
+ | Code generation | `Write Python code to collect IMU data and upload it to Edge Impulse.` |
152
+ | Troubleshooting | `Why is my Edge Impulse model showing high latency?` |
153
+
154
+ ---
155
+
156
+ ## Limitations
157
+
158
+ - Based on a 0.5B base model β€” may struggle with long multi-step reasoning
159
+ - Training data covers Edge Impulse docs as of mid-2026; newer features may be missing
160
+ - May hallucinate or fabricate undocumented APIs or block behavior
161
+ - Not validated for safety-critical or production use
162
+ - Validate generated code before deploying on hardware
163
+
164
+ ---
165
+
166
+ ## Related models
167
+
168
+ | Model | Base | Status |
169
+ |---|---|---|
170
+ | This model | Qwen/Qwen1.5-0.5B | βœ… Available |
171
+ | [eoinedge/edgeai-qwen2.5coder-1.5b-lora](https://huggingface.co/eoinedge/edgeai-qwen2.5coder-1.5b-lora) | Qwen2.5-Coder-1.5B-Instruct | πŸ”„ Training |
172
+ | [eoinedge/edgeai-qwen2.5coder-7b-lora](https://huggingface.co/eoinedge/edgeai-qwen2.5coder-7b-lora) | Qwen2.5-Coder-7B-Instruct | πŸ”„ Training |
173
+ | [eoinedge/arduino-qwen0.5-lora](https://huggingface.co/eoinedge/arduino-qwen0.5-lora) | Qwen/Qwen1.5-0.5B | βœ… Available |
174
+
175
+ ---
176
+
177
+ ## Citation
178
+
179
+ ```bibtex
180
+ @misc{edgeai-docs-embedding-qwen1.5-0.5b-instruct,
181
+ author = {Jordan, Eoin},
182
+ title = {edgeai-docs-embedding-qwen1.5-0.5b-instruct},
183
+ year = {2026},
184
+ publisher = {Hugging Face},
185
+ howpublished = {\url{https://huggingface.co/eoinedge/edgeai-docs-embedding-qwen1.5-0.5b-instruct}}
186
+ }
187
+ ```