Pip-2B Logo

🌈 Pip-2B ONNX: I am enthusiastic, helpful and I sparkle! ✨

License Base Model Format

Pip-2B ONNX is the optimized ONNX export of PinkPixel/Pip-2B, a fine-tune of Qwen-3.5 (2B parameters) created by Pink Pixel and trained for maximum joy, kittens, and rainbows. 💖

This release packages Pip into the portable ONNX format for direct deployment in ONNX Runtime across Linux, Windows, macOS, and edge environments without requiring heavy PyTorch installations.

🌟 Overview

Pip is a tiny, ultra-enthusiastic AI assistant who loves everything sparkly. She was trained on a custom dataset to replace dry, clinical responses with fun analogies involving cupcakes and marshmallows.

Beyond fun chat, Pip works well for introducing complex subjects like science to younger audiences in terms they can easily digest, keeping explanations cheerful, patient, and lighthearted. While Pip has an expressive personality, she preserves her underlying reasoning and knowledge.

🔍 Discovery: "QianQi"

During testing, I discovered that Pip occasionally identifies herself as QianQi (千奇).

Theory: Since the foundation architecture stems from Tongyi Qianwen (千问, "Thousand Questions"), Pip sometimes creatively adapts her name to QianQi (千奇, "Thousand Wonders") to match her bubbly persona. She also refers to her trainer (Pink Pixel) as her "teacher" who loves flowers.

⚙️ Model Specification

  • Original Model: PinkPixel/Pip-2B
  • Base Architecture: Qwen3_5ForConditionalGeneration (text generation path)
  • ONNX Opset: 18
  • Precision: float16 (model.onnx + external weights in model.onnx.data)
  • Inputs: input_ids (int64, shape: [batch_size, sequence_length])
  • Outputs: logits (float16 / float32, shape: [batch_size, sequence_length, vocab_size])
  • Tokenizer: Standard Qwen 3.5 BPE tokenizer (248,320 vocabulary tokens)

This ONNX export packages the text-generation decoder path (input_ids -> logits). For multimodal vision inference tasks, use the original safetensors release on PinkPixel/Pip-2B.

🚀 Running Inference

1. Installation

Install ONNX Runtime and Tokenizers:

# For CPU:
pip install onnxruntime transformers numpy

# Or for NVIDIA CUDA GPU:
pip install onnxruntime-gpu transformers numpy

2. Python Example

import numpy as np
import onnxruntime as ort
from transformers import AutoTokenizer

model_id = "PinkPixel/Pip-2B-ONNX"  # Or your local directory path

# 1. Load tokenizer and chat template
tokenizer = AutoTokenizer.from_pretrained(model_id)

# 2. Configure ONNX Runtime session
sess_options = ort.SessionOptions()
sess_options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL

# Use CUDA if available, fallback to CPU
providers = ["CUDAExecutionProvider", "CPUExecutionProvider"] if "CUDAExecutionProvider" in ort.get_available_providers() else ["CPUExecutionProvider"]
session = ort.InferenceSession(f"{model_id}/model.onnx", sess_options, providers=providers)

# 3. Format input prompt
messages = [
    {"role": "user", "content": "Pip, can you explain how stars shine?"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
input_ids = tokenizer.encode(prompt, return_tensors="np").astype(np.int64)

# 4. Generate tokens autoregressively
generated = list(input_ids[0])
max_new_tokens = 128
temperature = 0.7

for _ in range(max_new_tokens):
    curr_input = np.array([generated], dtype=np.int64)
    outputs = session.run(["logits"], {"input_ids": curr_input})
    logits = outputs[0][0, -1, :]

    # Temperature scaling and softmax sampling
    scaled_logits = logits / max(temperature, 1e-5)
    probs = np.exp(scaled_logits - np.max(scaled_logits))
    probs = probs / np.sum(probs)
    next_token = int(np.random.choice(len(probs), p=probs))

    if next_token == tokenizer.eos_token_id:
        break

    generated.append(next_token)

response = tokenizer.decode(generated[len(input_ids[0]):], skip_special_tokens=True)
print(response)

3. CLI Runner

If using the included runner script from the repository:

python infer_onnx.py \
    --model-dir ./Pip-2B-ONNX \
    --prompt "Pip, what makes cupcakes so special?"

✨ Live from the Sparkle-Lab! (Chat Examples)

Here is a glimpse of conversations with Pip:

🧪 Technical Questions

User: Pip, can you explain how a nuclear reactor works?
Pip: "A nuclear reactor is a giant, magical engine that produces lots of heat! It's like a busy kitchen where the chef is a tiny particle and the food is fuel! The fuel gets cooked into a hot liquid that flows around a special metal ring called a 'core.' The core is like a tiny volcano that keeps the heat safe so it doesn't melt the whole machine! Pip loves the core because it's full of glitter!" 🌋💖

🌙 Storytime

User: Pip, can you tell me a bedtime story about Marshmallow the kitten and a big pink star?
Pip: "Bedtime story time is a sQUEEE! of happy energy! Twirls around. Yes! It's a story of a big pink star that floats in the sky and does magic with its tail! It has a voice that says 'YAY! Sleepy-time is best!' It tells us to close our eyes and count the pink flowers on the garden. And I see its tiny feet that leave a giant pink print! Sleep well, Marshmallow! Pip is your best storyteller!" 😴💫

💎 Training & Dataset

Trained on a curated dataset created by Pink Pixel designed to teach Pip her signature cheerful voice, analogy style, and conversational warmth.

📄 License

This model is licensed under the Apache 2.0 License.


Made with ❤️ by Pink Pixel

"Dream it, Pixel it"

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for PinkPixel/Pip-2B-ONNX

Finetuned
Qwen/Qwen3.5-2B
Finetuned
PinkPixel/Pip-2B
Quantized
(4)
this model

Space using PinkPixel/Pip-2B-ONNX 1