Text Generation
Transformers
Safetensors
MLX
English
qwen2
flutter
dart
code-generation
mobile-development
qwen
qwen2.5-coder
vllm
agentic
agent
conversational
text-generation-inference
4-bit precision
Instructions to use Wizcoderr/qwen-flutter-fused with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Wizcoderr/qwen-flutter-fused with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Wizcoderr/qwen-flutter-fused") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Wizcoderr/qwen-flutter-fused") model = AutoModelForCausalLM.from_pretrained("Wizcoderr/qwen-flutter-fused", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use Wizcoderr/qwen-flutter-fused with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("Wizcoderr/qwen-flutter-fused") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use Wizcoderr/qwen-flutter-fused with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Wizcoderr/qwen-flutter-fused" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wizcoderr/qwen-flutter-fused", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Wizcoderr/qwen-flutter-fused
- SGLang
How to use Wizcoderr/qwen-flutter-fused with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Wizcoderr/qwen-flutter-fused" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wizcoderr/qwen-flutter-fused", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Wizcoderr/qwen-flutter-fused" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wizcoderr/qwen-flutter-fused", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi
How to use Wizcoderr/qwen-flutter-fused with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Wizcoderr/qwen-flutter-fused"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Wizcoderr/qwen-flutter-fused" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use Wizcoderr/qwen-flutter-fused with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Wizcoderr/qwen-flutter-fused"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Wizcoderr/qwen-flutter-fused" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wizcoderr/qwen-flutter-fused", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use Wizcoderr/qwen-flutter-fused with Docker Model Runner:
docker model run hf.co/Wizcoderr/qwen-flutter-fused
- Hermes Agent
How to use Wizcoderr/qwen-flutter-fused with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Wizcoderr/qwen-flutter-fused"
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 Wizcoderr/qwen-flutter-fused
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Wizcoderr/qwen-flutter-fused with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Wizcoderr/qwen-flutter-fused"
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 "Wizcoderr/qwen-flutter-fused" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -6,64 +6,55 @@ tags:
|
|
| 6 |
- flutter
|
| 7 |
- dart
|
| 8 |
- code-generation
|
| 9 |
-
-
|
|
|
|
| 10 |
- qwen2.5-coder
|
| 11 |
- mlx
|
| 12 |
- transformers
|
| 13 |
-
- llama-cpp
|
| 14 |
- vllm
|
| 15 |
- text-generation
|
| 16 |
-
-
|
| 17 |
-
- lora
|
| 18 |
-
- qlora
|
| 19 |
-
- mobile-development
|
| 20 |
-
- android
|
| 21 |
-
- ios
|
| 22 |
-
- pub-dev
|
| 23 |
-
- state-management
|
| 24 |
- agent
|
| 25 |
library_name: transformers
|
| 26 |
pipeline_tag: text-generation
|
| 27 |
base_model: Qwen/Qwen2.5-Coder-14B-Instruct
|
| 28 |
datasets:
|
| 29 |
- flutter_docs_alpaca
|
| 30 |
-
model-index:
|
| 31 |
-
- name: GenMobiAi-Qwen2.5-Coder-14B-Flutter
|
| 32 |
-
results: []
|
| 33 |
---
|
| 34 |
|
| 35 |
-
# GenMobiAi β Qwen2.5-Coder-14B Flutter
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|---|---|
|
| 43 |
-
| Base Model | Qwen/Qwen2.5-Coder-14B-Instruct |
|
| 44 |
-
| Architecture | Qwen2ForCausalLM |
|
| 45 |
-
| Parameters | 14.77B |
|
| 46 |
-
| Quantization | 4-bit MLX (group_size=64) |
|
| 47 |
-
| Context Length | 128,000 tokens |
|
| 48 |
-
| Fine-tune Method | QLoRA (LoRA rank=8, scale=20, 16 layers) |
|
| 49 |
-
| Training Framework | MLX-LM on Apple Silicon |
|
| 50 |
-
| Training Samples | 311 Flutter/Dart instruction pairs |
|
| 51 |
-
| Training Iterations | 1,000 |
|
| 52 |
-
| License | Apache 2.0 |
|
| 53 |
|
| 54 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
-
-
|
| 60 |
-
-
|
| 61 |
-
-
|
| 62 |
-
- **UI scaffolding** β Material Design 3, Cupertino, adaptive layouts, responsive design
|
| 63 |
-
- **Multi-agent orchestration** β LangGraph-compatible tool-call responses via ChatML format
|
| 64 |
-
- **REST API clients** β Dio, http package, interceptors, retry logic, error handling
|
| 65 |
-
- **Architecture patterns** β MVVM, Clean Architecture, Repository pattern, Service Locator (GetIt)
|
| 66 |
-
- **Testing** β Widget testing, unit testing with mockito, integration testing
|
| 67 |
|
| 68 |
## Quick Start
|
| 69 |
|
|
@@ -73,282 +64,198 @@ GenMobiAi is designed for:
|
|
| 73 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 74 |
import torch
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 79 |
model = AutoModelForCausalLM.from_pretrained(
|
| 80 |
-
|
| 81 |
torch_dtype=torch.bfloat16,
|
| 82 |
device_map="auto"
|
| 83 |
)
|
| 84 |
|
| 85 |
messages = [
|
| 86 |
-
{
|
| 87 |
-
|
| 88 |
-
"content": "You are GenMobiAi, an expert Flutter and Dart developer. You write clean, production-ready Flutter code following null safety, MVVM architecture, and Flutter best practices."
|
| 89 |
-
},
|
| 90 |
-
{
|
| 91 |
-
"role": "user",
|
| 92 |
-
"content": "Write a Flutter provider for user authentication with login, logout, and a loading state."
|
| 93 |
-
}
|
| 94 |
]
|
| 95 |
|
| 96 |
-
text = tokenizer.apply_chat_template(
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
)
|
| 101 |
-
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 102 |
-
|
| 103 |
-
generated_ids = model.generate(
|
| 104 |
-
**model_inputs,
|
| 105 |
-
max_new_tokens=1024,
|
| 106 |
-
temperature=0.3,
|
| 107 |
-
top_p=0.9,
|
| 108 |
-
do_sample=True
|
| 109 |
-
)
|
| 110 |
-
generated_ids = [
|
| 111 |
-
output_ids[len(input_ids):]
|
| 112 |
-
for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 113 |
-
]
|
| 114 |
-
|
| 115 |
-
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 116 |
-
print(response)
|
| 117 |
```
|
| 118 |
|
| 119 |
-
### MLX-LM (Apple Silicon
|
| 120 |
|
| 121 |
```bash
|
| 122 |
-
pip install mlx-lm
|
| 123 |
-
|
| 124 |
python -m mlx_lm.generate \
|
| 125 |
--model path/to/genmobiai-qwen2.5-coder-14b-flutter \
|
| 126 |
-
--prompt "Write a Flutter
|
| 127 |
--max-tokens 1024 \
|
| 128 |
--temp 0.3
|
| 129 |
```
|
| 130 |
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
```python
|
| 134 |
-
from mlx_lm import load, generate
|
| 135 |
-
|
| 136 |
-
model, tokenizer = load("path/to/genmobiai-qwen2.5-coder-14b-flutter")
|
| 137 |
-
|
| 138 |
-
messages = [
|
| 139 |
-
{"role": "system", "content": "You are GenMobiAi, an expert Flutter/Dart developer."},
|
| 140 |
-
{"role": "user", "content": "Create a Riverpod provider for a shopping cart with add/remove/clear operations."}
|
| 141 |
-
]
|
| 142 |
-
|
| 143 |
-
prompt = tokenizer.apply_chat_template(
|
| 144 |
-
messages, tokenize=False, add_generation_prompt=True
|
| 145 |
-
)
|
| 146 |
-
response = generate(model, tokenizer, prompt=prompt, max_tokens=1024, temp=0.3)
|
| 147 |
-
print(response)
|
| 148 |
-
```
|
| 149 |
-
|
| 150 |
-
### vLLM (high-throughput serving)
|
| 151 |
|
| 152 |
```python
|
| 153 |
from vllm import LLM, SamplingParams
|
| 154 |
|
| 155 |
-
llm = LLM(
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
dtype="bfloat16"
|
| 160 |
)
|
| 161 |
-
|
| 162 |
-
sampling_params = SamplingParams(temperature=0.3, top_p=0.9, max_tokens=1024)
|
| 163 |
-
|
| 164 |
-
prompts = [
|
| 165 |
-
"<|im_start|>system\nYou are GenMobiAi, an expert Flutter/Dart developer.<|im_end|>\n"
|
| 166 |
-
"<|im_start|>user\nWrite a Flutter http interceptor for auth token refresh.<|im_end|>\n"
|
| 167 |
-
"<|im_start|>assistant\n"
|
| 168 |
-
]
|
| 169 |
-
|
| 170 |
-
outputs = llm.generate(prompts, sampling_params)
|
| 171 |
print(outputs[0].outputs[0].text)
|
| 172 |
```
|
| 173 |
|
| 174 |
-
###
|
| 175 |
-
|
| 176 |
-
Convert to GGUF first using `llama.cpp`'s `convert_hf_to_gguf.py`, then:
|
| 177 |
|
| 178 |
```bash
|
| 179 |
-
#
|
| 180 |
-
|
| 181 |
-
FROM ./genmobiai-qwen2.5-coder-14b-flutter-q4_k_m.gguf
|
| 182 |
-
|
| 183 |
-
SYSTEM """You are GenMobiAi, an expert Flutter and Dart developer. You write clean, production-ready Flutter code following MVVM architecture, null safety, and proper dependency injection."""
|
| 184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
PARAMETER temperature 0.3
|
| 186 |
-
PARAMETER num_ctx 8192
|
| 187 |
-
PARAMETER top_k 40
|
| 188 |
PARAMETER top_p 0.9
|
| 189 |
EOF
|
| 190 |
|
| 191 |
-
ollama
|
| 192 |
-
ollama run genmobiai-flutter "Write a Flutter provider for user authentication"
|
| 193 |
```
|
| 194 |
|
| 195 |
-
##
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
- **
|
| 225 |
-
- **
|
| 226 |
-
- **
|
| 227 |
-
|
| 228 |
-
##
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
##
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
|
| 259 |
## Limitations
|
| 260 |
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
## Intended Hardware
|
| 269 |
|
| 270 |
-
|
| 271 |
-
|---|---|---|
|
| 272 |
-
| Apple M-series (MLX) | M2/M3/M4 with 16GB+ unified memory | 100+ tokens/sec on 4K context |
|
| 273 |
-
| CUDA GPU (BF16) | RTX 3090, A100, 4090 (24GB+) | 200+ tokens/sec |
|
| 274 |
-
| CUDA GPU (GPTQ/AWQ) | RTX 4070, 4080, A6000 (16GB+) | 150+ tokens/sec |
|
| 275 |
-
| CPU (llama.cpp GGUF Q4) | Intel/AMD 8-core+ with 32GB RAM | 5β15 tokens/sec |
|
| 276 |
-
| Server (vLLM batching) | 2x H100 or A100 80GB | 1000+ tokens/sec (batch=64) |
|
| 277 |
-
|
| 278 |
-
## File Structure
|
| 279 |
|
| 280 |
```
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
βββ tokenizer.json # BPE tokenizer vocabulary (11 MB)
|
| 287 |
-
βββ tokenizer_config.json # Tokenizer hyperparameters
|
| 288 |
-
βββ special_tokens_map.json # Special token metadata
|
| 289 |
-
βββ added_tokens.json # Non-BPE token ID mappings
|
| 290 |
-
βββ generation_config.json # Generation defaults (temp, top_p, etc.)
|
| 291 |
-
βββ chat_template.jinja # ChatML format template
|
| 292 |
-
βββ preprocessor_config.json # Preprocessor type hint
|
| 293 |
-
βββ .gitattributes # Git LFS tracking rules
|
| 294 |
-
βββ LICENSE # Apache 2.0
|
| 295 |
-
βββ README.md # This file
|
| 296 |
```
|
| 297 |
|
| 298 |
-
##
|
| 299 |
-
|
| 300 |
-
Apache 2.0. See [LICENSE](./LICENSE) for the full text.
|
| 301 |
-
|
| 302 |
-
**Attribution:**
|
| 303 |
-
- **Base model:** [Qwen/Qwen2.5-Coder-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct) β Apache 2.0, Alibaba Cloud
|
| 304 |
-
- **Fine-tuning adaptation:** GenMobiAi β Apache 2.0
|
| 305 |
-
- **Training data sources:** flutter.dev (BSD 3-Clause), pub.dev packages (per-package licenses), Flutter GitHub (BSD 3-Clause)
|
| 306 |
-
|
| 307 |
-
When using this model in research or production, please cite:
|
| 308 |
|
| 309 |
```bibtex
|
| 310 |
@misc{genmobiai2025,
|
| 311 |
-
title
|
| 312 |
-
author
|
| 313 |
-
year
|
| 314 |
-
url
|
|
|
|
| 315 |
}
|
| 316 |
-
```
|
| 317 |
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
If you use this model in research or production work, please cite both the fine-tuned model and the base model:
|
| 321 |
-
|
| 322 |
-
```bibtex
|
| 323 |
-
@article{qwen2_coder_2024,
|
| 324 |
title = {Qwen2.5-Coder: A Capable Code Language Model},
|
| 325 |
author = {Alibaba Cloud},
|
| 326 |
year = {2024},
|
| 327 |
url = {https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct}
|
| 328 |
}
|
| 329 |
-
|
| 330 |
-
@misc{genmobiai2025,
|
| 331 |
-
title = {GenMobiAi: Qwen2.5-Coder-14B Fine-tuned for Flutter/Dart Development},
|
| 332 |
-
author = {GenMobiAi Contributors},
|
| 333 |
-
year = {2025},
|
| 334 |
-
url = {https://huggingface.co/your-org/genmobiai-qwen2.5-coder-14b-flutter}
|
| 335 |
-
}
|
| 336 |
```
|
| 337 |
|
| 338 |
-
##
|
|
|
|
|
|
|
| 339 |
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
3. Improve documentation via edits to this README
|
| 344 |
|
| 345 |
-
|
|
|
|
|
|
|
| 346 |
|
| 347 |
-
|
|
|
|
|
|
|
|
|
|
| 348 |
|
| 349 |
---
|
| 350 |
|
| 351 |
-
**
|
| 352 |
-
**
|
| 353 |
-
**
|
| 354 |
-
**Recommended Context:** 4Kβ8K tokens (optimal speed on consumer hardware)
|
|
|
|
| 6 |
- flutter
|
| 7 |
- dart
|
| 8 |
- code-generation
|
| 9 |
+
- mobile-development
|
| 10 |
+
- qwen
|
| 11 |
- qwen2.5-coder
|
| 12 |
- mlx
|
| 13 |
- transformers
|
|
|
|
| 14 |
- vllm
|
| 15 |
- text-generation
|
| 16 |
+
- agentic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
- agent
|
| 18 |
library_name: transformers
|
| 19 |
pipeline_tag: text-generation
|
| 20 |
base_model: Qwen/Qwen2.5-Coder-14B-Instruct
|
| 21 |
datasets:
|
| 22 |
- flutter_docs_alpaca
|
|
|
|
|
|
|
|
|
|
| 23 |
---
|
| 24 |
|
| 25 |
+
# GenMobiAi β Qwen2.5-Coder-14B Flutter Specialist
|
| 26 |
+
|
| 27 |
+
**GenMobiAi** is a fine-tuned version of [Qwen2.5-Coder-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct) specialized for Flutter and Dart development. Optimized for agentic code generation, mobile development, and multi-framework orchestration.
|
| 28 |
|
| 29 |
+
## Overview
|
| 30 |
|
| 31 |
+
**Type**: Code Generation + Agentic AI
|
| 32 |
+
**Parameters**: 14.77B
|
| 33 |
+
**Architecture**: Qwen2ForCausalLM (48 layers)
|
| 34 |
+
**Context Length**: 128,000 tokens
|
| 35 |
+
**Quantization**: 4-bit MLX (group_size=64)
|
| 36 |
+
**Training Method**: QLoRA fine-tuning via MLX-LM
|
| 37 |
+
**Training Data**: 311 Flutter/Dart samples from flutter.dev + pub.dev
|
| 38 |
+
**License**: Apache 2.0
|
| 39 |
|
| 40 |
+
## Key Features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
### Flutter Code Generation
|
| 43 |
+
- **Widgets**: StatelessWidget, StatefulWidget, custom widgets, Material 3 design
|
| 44 |
+
- **State Management**: Provider, Riverpod, GetX, BLoC, MobX patterns
|
| 45 |
+
- **Async Dart**: Futures, Streams, isolates, error handling
|
| 46 |
+
- **Architecture**: MVVM, Clean Architecture, Repository pattern
|
| 47 |
|
| 48 |
+
### Pub.dev Package Intelligence
|
| 49 |
+
- HTTP clients (Dio, http with interceptors)
|
| 50 |
+
- Local storage (hive, shared_preferences)
|
| 51 |
+
- Animations (flutter_animate, lottie)
|
| 52 |
+
- Testing (widget tests, unit tests with mockito)
|
| 53 |
|
| 54 |
+
### Agentic Capabilities
|
| 55 |
+
- ChatML format with tool-call support (LangGraph-compatible)
|
| 56 |
+
- Multi-message context preservation
|
| 57 |
+
- Structured JSON tool responses
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
## Quick Start
|
| 60 |
|
|
|
|
| 64 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 65 |
import torch
|
| 66 |
|
| 67 |
+
tokenizer = AutoTokenizer.from_pretrained("your-org/genmobiai-qwen2.5-coder-14b-flutter")
|
|
|
|
|
|
|
| 68 |
model = AutoModelForCausalLM.from_pretrained(
|
| 69 |
+
"your-org/genmobiai-qwen2.5-coder-14b-flutter",
|
| 70 |
torch_dtype=torch.bfloat16,
|
| 71 |
device_map="auto"
|
| 72 |
)
|
| 73 |
|
| 74 |
messages = [
|
| 75 |
+
{"role": "system", "content": "You are GenMobiAi, an expert Flutter developer."},
|
| 76 |
+
{"role": "user", "content": "Create a Riverpod provider for a shopping cart."}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
]
|
| 78 |
|
| 79 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 80 |
+
inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 81 |
+
output = model.generate(**inputs, max_new_tokens=1024, temperature=0.3, top_p=0.9)
|
| 82 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
```
|
| 84 |
|
| 85 |
+
### MLX-LM (Apple Silicon, recommended)
|
| 86 |
|
| 87 |
```bash
|
|
|
|
|
|
|
| 88 |
python -m mlx_lm.generate \
|
| 89 |
--model path/to/genmobiai-qwen2.5-coder-14b-flutter \
|
| 90 |
+
--prompt "Write a Flutter Counter widget with SharedPreferences persistence" \
|
| 91 |
--max-tokens 1024 \
|
| 92 |
--temp 0.3
|
| 93 |
```
|
| 94 |
|
| 95 |
+
### vLLM (High-Throughput)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
```python
|
| 98 |
from vllm import LLM, SamplingParams
|
| 99 |
|
| 100 |
+
llm = LLM("path/to/genmobiai-qwen2.5-coder-14b-flutter", max_model_len=8192)
|
| 101 |
+
outputs = llm.generate(
|
| 102 |
+
["<|im_start|>user\nWrite a Flutter auth provider<|im_end|>\n"],
|
| 103 |
+
SamplingParams(temperature=0.3, top_p=0.9, max_tokens=1024)
|
|
|
|
| 104 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
print(outputs[0].outputs[0].text)
|
| 106 |
```
|
| 107 |
|
| 108 |
+
### Ollama
|
|
|
|
|
|
|
| 109 |
|
| 110 |
```bash
|
| 111 |
+
# Convert to GGUF first
|
| 112 |
+
python -m llama_cpp.server --model path/genmobiai-q4_k_m.gguf --port 8000
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
+
# Or use Modelfile
|
| 115 |
+
ollama create genmobiai -f - <<EOF
|
| 116 |
+
FROM ./genmobiai-q4_k_m.gguf
|
| 117 |
+
SYSTEM "You are GenMobiAi, an expert Flutter developer."
|
| 118 |
PARAMETER temperature 0.3
|
|
|
|
|
|
|
| 119 |
PARAMETER top_p 0.9
|
| 120 |
EOF
|
| 121 |
|
| 122 |
+
ollama run genmobiai "Build a Flutter provider for authentication"
|
|
|
|
| 123 |
```
|
| 124 |
|
| 125 |
+
## Recommended Sampling Parameters
|
| 126 |
+
|
| 127 |
+
| Use Case | Temperature | Top-P | Top-K | Repetition Penalty |
|
| 128 |
+
|----------|------------|-------|-------|-------------------|
|
| 129 |
+
| Code Generation | 0.3 | 0.9 | 40 | 1.05 |
|
| 130 |
+
| Complex Logic | 0.5 | 0.95 | 50 | 1.0 |
|
| 131 |
+
| Agentic Output | 0.2 | 0.85 | 40 | 1.1 |
|
| 132 |
+
| Creative Patterns | 0.7 | 0.95 | 50 | 0.95 |
|
| 133 |
+
|
| 134 |
+
## Model Specifications
|
| 135 |
+
|
| 136 |
+
### Architecture
|
| 137 |
+
- **Model Type**: Qwen2ForCausalLM
|
| 138 |
+
- **Hidden Size**: 5,120
|
| 139 |
+
- **Intermediate Size**: 13,824
|
| 140 |
+
- **Num Layers**: 48
|
| 141 |
+
- **Num Attention Heads**: 40
|
| 142 |
+
- **Num KV Heads**: 8
|
| 143 |
+
- **RoPE Theta**: 1,000,000
|
| 144 |
+
- **Max Position Embeddings**: 128,000
|
| 145 |
+
|
| 146 |
+
### Tokenizer
|
| 147 |
+
- **Type**: Qwen2Tokenizer
|
| 148 |
+
- **Vocab Size**: 152,064
|
| 149 |
+
- **EOS Token**: `<|im_end|>` (151645)
|
| 150 |
+
- **PAD Token**: `<|endoftext|>` (151643)
|
| 151 |
+
- **Special Tokens**: ChatML (`<|im_start|>`, `<|im_end|>`) + tool-call markers
|
| 152 |
+
|
| 153 |
+
### Quantization (MLX)
|
| 154 |
+
- **Bits**: 4
|
| 155 |
+
- **Group Size**: 64
|
| 156 |
+
- **Reduces Size**: ~28GB (BF16) β ~8.3GB (4-bit)
|
| 157 |
+
|
| 158 |
+
## Training Configuration
|
| 159 |
+
|
| 160 |
+
**Dataset**: 311 Flutter/Dart samples (279 train / 32 eval)
|
| 161 |
+
**Method**: QLoRA via MLX-LM on Apple Silicon
|
| 162 |
+
**LoRA Rank**: 8
|
| 163 |
+
**Trainable Layers**: 16 of 48
|
| 164 |
+
**Batch Size**: 1 | **Grad Accumulation**: 2
|
| 165 |
+
**Learning Rate**: 1e-5
|
| 166 |
+
**Max Seq Length**: 1,024
|
| 167 |
+
**Iterations**: 1,000
|
| 168 |
+
**Estimated Training Time**: 4β8 hours (M3/M4 24GB)
|
| 169 |
+
|
| 170 |
+
## Hardware Requirements
|
| 171 |
+
|
| 172 |
+
| Hardware | Memory | Inference Speed | Use Case |
|
| 173 |
+
|----------|--------|-----------------|----------|
|
| 174 |
+
| Apple M3/M4 (MLX) | 16GB+ | 100+ tok/s @ 4K | Development |
|
| 175 |
+
| RTX 4090 (BF16) | 24GB | 200+ tok/s | Production |
|
| 176 |
+
| H100 (batched) | 80GB | 1000+ tok/s | Server |
|
| 177 |
+
| CPU (GGUF Q4) | 32GB | 10β15 tok/s | Edge |
|
| 178 |
+
|
| 179 |
+
## Capabilities & Use Cases
|
| 180 |
+
|
| 181 |
+
### Flutter Development
|
| 182 |
+
- β
Widget scaffolding (Material 3, Cupertino, adaptive)
|
| 183 |
+
- β
State management patterns (Provider, Riverpod, GetX, BLoC)
|
| 184 |
+
- β
REST API integration (Dio, http, interceptors)
|
| 185 |
+
- β
Local storage (hive, shared_preferences, file I/O)
|
| 186 |
+
- β
Testing (widget tests, unit tests, integration tests)
|
| 187 |
+
- β
Platform channels & native integration
|
| 188 |
+
|
| 189 |
+
### Code Quality
|
| 190 |
+
- Null safety best practices
|
| 191 |
+
- MVVM + Clean Architecture patterns
|
| 192 |
+
- Error handling & logging
|
| 193 |
+
- Performance optimization tips
|
| 194 |
+
- Documentation & inline comments
|
| 195 |
+
|
| 196 |
+
### Agentic Features
|
| 197 |
+
- Tool-call support via XML-wrapped JSON
|
| 198 |
+
- Multi-message context preservation
|
| 199 |
+
- Chat template integration (ChatML)
|
| 200 |
+
- LangGraph workflow compatibility
|
| 201 |
|
| 202 |
## Limitations
|
| 203 |
|
| 204 |
+
1. **Dataset Size**: 311 samples may cause hallucinations on less-documented packages
|
| 205 |
+
2. **Quantization Artifacts**: 4-bit rounding in floating-point operations
|
| 206 |
+
3. **Vision Tokens**: Vocabulary includes image tokens (inactive) from multimodal base
|
| 207 |
+
4. **Context in Practice**: MLX 4-bit inference optimal at 4Kβ8K tokens on 24GB
|
| 208 |
+
5. **No Formal Benchmarks**: Performance validated empirically, not on standard evals
|
| 209 |
+
6. **Dart 3+ Features**: records, sealed classes partially covered
|
|
|
|
|
|
|
| 210 |
|
| 211 |
+
## Special Tokens
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
|
| 213 |
```
|
| 214 |
+
<|endoftext|> (ID: 151643) β Padding / Fallback EOS
|
| 215 |
+
<|im_start|> (ID: 151644) β ChatML message start
|
| 216 |
+
<|im_end|> (ID: 151645) β ChatML message end (Primary EOS)
|
| 217 |
+
<tool_call> (Custom) β Agentic tool invocation (XML wrapper)
|
| 218 |
+
</tool_call> (Custom) β Agentic tool response end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
```
|
| 220 |
|
| 221 |
+
## Citation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
|
| 223 |
```bibtex
|
| 224 |
@misc{genmobiai2025,
|
| 225 |
+
title = {GenMobiAi: Qwen2.5-Coder-14B Fine-tuned for Flutter/Dart Development},
|
| 226 |
+
author = {GenMobiAi Contributors},
|
| 227 |
+
year = {2025},
|
| 228 |
+
url = {https://huggingface.co/your-org/genmobiai-qwen2.5-coder-14b-flutter},
|
| 229 |
+
license = {Apache 2.0}
|
| 230 |
}
|
|
|
|
| 231 |
|
| 232 |
+
@misc{qwen2_5_coder,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
title = {Qwen2.5-Coder: A Capable Code Language Model},
|
| 234 |
author = {Alibaba Cloud},
|
| 235 |
year = {2024},
|
| 236 |
url = {https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct}
|
| 237 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
```
|
| 239 |
|
| 240 |
+
## License
|
| 241 |
+
|
| 242 |
+
This model is licensed under the **Apache License 2.0**.
|
| 243 |
|
| 244 |
+
- **Base Model**: Qwen2.5-Coder-14B-Instruct by Alibaba Cloud (Apache 2.0)
|
| 245 |
+
- **Fine-tuning & Specialization**: GenMobiAi Contributors (Apache 2.0)
|
| 246 |
+
- **Training Data**: flutter.dev (BSD 3-Clause), pub.dev packages (per-package), Flutter GitHub (BSD 3-Clause)
|
|
|
|
| 247 |
|
| 248 |
+
See [LICENSE](./LICENSE) for full text.
|
| 249 |
+
|
| 250 |
+
## Contributing
|
| 251 |
|
| 252 |
+
Issues or improvements?
|
| 253 |
+
- Report on [GitHub](https://github.com/your-org/genmobiai) or [HF Hub](https://huggingface.co/your-org/genmobiai-qwen2.5-coder-14b-flutter)
|
| 254 |
+
- Submit Flutter patterns to expand the training dataset
|
| 255 |
+
- Improve documentation
|
| 256 |
|
| 257 |
---
|
| 258 |
|
| 259 |
+
**Last Updated**: 2025-05-25
|
| 260 |
+
**Status**: Production-Ready
|
| 261 |
+
**Framework Support**: Transformers, MLX-LM, vLLM, llama.cpp, Ollama
|
|
|