--- language: - en license: mit library_name: quantum-transformer tags: - quantum-ai - transformer - quantum-inspired - language-model metrics: - perplexity - entropy-confidence --- # DEMO (https://www.youtube.com/watch?v=btVQvQEKVWM/) # ⚛️ Quantum Transformer (QT-4Q) - The First Pre-trained Quantum AI Model **Quantum AI QT-4Q** is a groundbreaking, quantum-inspired transformer model designed for efficient language modeling. Unlike classical transformers, this architecture utilizes **quantum gates** (simulated via high-fidelity linear transformations) as the core mechanism for attention and information processing. This is the **first pre-trained model** released under the Quantum AI project, marking a new milestone in merging Quantum Mechanics with Generative AI. ## Key Features - **Quantum-Inspired Attention**: Replaces standard dot-product attention with quantum circuit-inspired gates for complex signal processing. - **State-Space Efficiency**: Operates in a quantum-like state space, allowing for unique information density. - **Entropy-Based Confidence**: Built-in metrics to calculate model certainty during generation using Shannon Entropy. - **BPE Tokenization**: Professional Byte-Pair Encoding for superior fluency. - **KV Caching**: Optimized for high-speed, low-latency inference. ## Architecture Details | Parameter | Value | | :--- | :--- | | **Model Type** | Quantum Transformer (Causal LM) | | **Qubits** | 4 Qubits (Simulated) | | **Context Length** | 256 Tokens | | **Hidden Dimension** | 128 | | **Layers** | 4 Quantum Blocks | | **Heads** | 4 | | **Vocab Size** | 8,192 | ## Getting Started You can load and use this model directly using the `quantum-transformer` library. ### Installation ```bash pip install quantum-transformer ``` ### Inference ```python from quantum_transformer.model import QuantumTransformerLM # Load the first-ever pre-trained Quantum AI model model = QuantumTransformerLM.from_pretrained("Harishapc01/quantum-qt-4q") # Generate text with quantum-inspired logic output = model.generate( prompt="Quantum AI is the future of", max_new_tokens=100, temperature=0.8 ) print(output) ``` ## Evaluation & Confidence One of the unique features of the QT-4Q model is its **Structural Confidence Guard**. During generation, it monitors the entropy of the probability distribution to ensure the output remains coherent and scientifically grounded. ## License This model is released under the **MIT License**. ## 🤝 Contact & Support **Quantum AI Team** **Developer**: Harisha P C **Email**: [reach.harishapc@gmail.com](mailto:reach.harishapc@gmail.com) **Website**: [https://harishapc.com](https://www.harishapc.com) --- *Developed for the research of Quantum-Inspired Artificial Intelligence.*