Views
No views yet
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("path/to/qwen3-14b-flutter-fused")
5model = AutoModelForCausalLM.from_pretrained(
6 "path/to/qwen3-14b-flutter-fused",
7 torch_dtype=torch.bfloat16,
8 device_map="auto"
9)
10
11messages = [
12 {"role": "system", "content": "You are GenMobiAi, an expert Flutter developer assistant."},
13 {"role": "user", "content": "Create a responsive Flutter dashboard with dark mode support"}
14]
15
16text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
17inputs = tokenizer([text], return_tensors="pt").to(model.device)
18output = model.generate(**inputs, max_new_tokens=1024, temperature=0.3, top_p=0.9)
19print(tokenizer.decode(output[0], skip_special_tokens=True))1python -m mlx_lm.generate \
2 --model path/to/qwen3-14b-flutter-fused \
3 --prompt "Write a Flutter Provider pattern for cart management" \
4 --max-tokens 1024 \
5 --temp 0.3 \
6 --top-p 0.91from vllm import LLM, SamplingParams
2
3llm = LLM("path/to/qwen3-14b-flutter-fused", max_model_len=4096)
4outputs = llm.generate(
5 ["<|im_start|>user\nCreate a Riverpod async data provider for user authentication<|im_end|>\n"],
6 SamplingParams(temperature=0.3, top_p=0.9, max_tokens=1024, repetition_penalty=1.05)
7)
8print(outputs[0].outputs[0].text)| Use Case | Temperature | Top-P | Top-K | Repetition Penalty |
|---|---|---|---|---|
| Code Generation | 0.3 | 0.9 | 40 | 1.05 |
| Complex Logic | 0.5 | 0.95 | 50 | 1.0 |
| Agentic Workflows | 0.2 | 0.85 | 40 | 1.1 |
| Creative Patterns | 0.7 | 0.95 | 50 | 0.95 |
| Documentation | 0.4 | 0.92 | 40 | 1.0 |
| Hardware | Memory | Inference Speed | Use Case |
|---|---|---|---|
| Apple M2/M3/M4 (MLX) | 24GB+ | 100+ tok/s | Development |
| Apple M1 (MLX) | 16GB+ | 50-80 tok/s | Development |
| RTX 4090 (BF16) | 24GB | 150+ tok/s | Local Production |
| RTX 3090 (BF16) | 24GB | 100+ tok/s | Local Production |
| H100 (batched) | 80GB | 800+ tok/s | Server Scale |
| CPU (GGUF Q4) | 32GB | 10-15 tok/s | Edge Devices |
[151643] → BOS Token (Beginning of Sequence)
[151645] → EOS Token (End of Sequence)
<|im_start|> → ChatML message start
<|im_end|> → ChatML message end1python scripts/mlx_to_gguf.py ./models/qwen3-14b-flutter-fused \
2 -o qwen3-14b-flutter.gguf \
3 -q q4_k_mq4_k_m - 4-bit K-means (recommended balance)q5_0 - 5-bit quantization (higher quality)q8_0 - 8-bit quantization (best quality, larger size)q3_k_m - 3-bit K-means (smallest, lower quality)1# After GGUF conversion
2ollama create qwen3-flutter -f Modelfile
3ollama run qwen3-flutter "Create a BLoC pattern for form validation"1python -m mlx_lm.lora \
2 --model path/to/qwen3-14b-flutter-fused \
3 --data train_data.jsonl \
4 --lora-layers 8 \
5 --batch-size 1 \
6 --iters 5001from transformers import TrainingArguments, SFTTrainer
2from peft import LoraConfig
3
4lora_config = LoraConfig(
5 r=8,
6 lora_alpha=16,
7 target_modules=["q_proj", "v_proj"],
8 lora_dropout=0.05,
9 bias="none"
10)
11
12training_args = TrainingArguments(
13 output_dir="./flutter-finetuned",
14 num_train_epochs=3,
15 per_device_train_batch_size=1,
16 learning_rate=1e-5,
17 bf16=True
18)
19
20trainer = SFTTrainer(
21 model="path/to/qwen3-14b-flutter-fused",
22 args=training_args,
23 peft_config=lora_config,
24 train_dataset=train_dataset
25)
26trainer.train()1# Reduce max_new_tokens or use smaller batch_size
2output = model.generate(**inputs, max_new_tokens=512) # Instead of 10241@misc{genmobiai2025_qwen3,
2 title = {Qwen3 14B Flutter Fused: Fine-tuned for Flutter/Dart Development},
3 author = {GenMobiAi Contributors},
4 year = {2025},
5 url = {https://huggingface.co/Wizcoderr/qwen3-14b-flutter-fused},
6 license = {Community License}
7}