Views
No views yet
1import { AutoProcessor, AutoModelForImageTextToText, TextStreamer } from '@huggingface/transformers';
2
3const MODEL_ID = 'mentriaai/Qwen3.5-0.8B-quotes-ONNX';
4
5const processor = await AutoProcessor.from_pretrained(MODEL_ID);
6const model = await AutoModelForImageTextToText.from_pretrained(MODEL_ID, {
7 dtype: { embed_tokens: 'q4', vision_encoder: 'fp16', decoder_model_merged: 'q4' },
8 device: 'webgpu',
9});
10
11const messages = [
12 { role: 'system', content: 'You are a poetic thinker. Write one short, original motivational quote (1-2 sentences). Do not attribute it to anyone. No preamble, no quotation marks — just the quote itself.' },
13 { role: 'user', content: [{ type: 'text', text: 'Give me a motivational quote.' }] },
14];
15
16const textContent = processor.apply_chat_template(messages, {
17 tokenize: false,
18 add_generation_prompt: true,
19});
20
21const inputs = await processor(textContent, null, { padding: true, truncation: true });
22
23const streamer = new TextStreamer(processor.tokenizer, {
24 skip_prompt: true,
25 skip_special_tokens: true,
26 callback_function(token) {
27 process.stdout.write(token);
28 },
29});
30
31await model.generate({
32 ...inputs,
33 max_new_tokens: 128,
34 do_sample: true,
35 temperature: 0.9,
36 top_p: 0.95,
37 streamer,
38});The seeds you plant in silence become the forests that speak for you.
Fear is a compass — it always points toward the thing worth doing.
You are both the sculptor and the marble — chip away everything that is not you.
The coastline of your dreams is where the sea meets the shore — follow it.
| Base model | Qwen/Qwen3.5-0.8B |
| Architecture | Hybrid Mamba (DeltaNet) + Transformer, 24 layers, 0.8B params |
| Fine-tuning | LoRA (rank 16, scale 2.0, all linear layers), 200 iterations |
| Training data | 229 curated motivational quotes in chat format |
| Training hardware | Apple M4 Pro 24GB via mlx-lm |
| ONNX source | Weight-swapped from onnx-community/Qwen3.5-0.8B-ONNX |
| Quantization | Q4 (4-bit weight-only, block size 32) |
| License | Apache 2.0 |
onnx/
decoder_model_merged_q4.onnx (813 KB graph + 452 MB weights)
embed_tokens_q4.onnx (857 B graph + 155 MB weights)
vision_encoder_fp16.onnx (183 KB graph + 195 MB weights)