Text Generation
Transformers
Safetensors
PyTorch
ONNX
English
qtensorformer
q-tensorformer
high-throughput-inference
tensor-train
tensor-networks
tensorrt-llm
vllm
continuous-batching
paged-attention
speculative-decoding
zero-svd
adaptive-computation
dynamic-neural-networks
kv-cache
kv-cache-quantization
attention-sinks
lyapunov-stability
control-theory
contextual-bandits
edge-ai
edge-inference
on-device-ai
model-compression
hopper-h100
blackwell-b200
jetson-orin
jetson-thor
grouped-query-attention
rotary-position-embeddings
custom_code
academic-paper
ieee
neurips
vit-ap-university
deepseek
deepseek-r1
reasoning
chain-of-thought
gsm8k
openai-compatible
fastapi
rest-api
sse-streaming
onnx-runtime
embedded-ai
hardware-telemetry
power-efficiency
green-ai
raspberry-pi
smollm2
qwen2.5
llama-3.2
apple-silicon
Instructions to use Premchan369/Q-TensorFormer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Premchan369/Q-TensorFormer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Premchan369/Q-TensorFormer", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Premchan369/Q-TensorFormer", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Premchan369/Q-TensorFormer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Premchan369/Q-TensorFormer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Premchan369/Q-TensorFormer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Premchan369/Q-TensorFormer
- SGLang
How to use Premchan369/Q-TensorFormer 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 "Premchan369/Q-TensorFormer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Premchan369/Q-TensorFormer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Premchan369/Q-TensorFormer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Premchan369/Q-TensorFormer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Premchan369/Q-TensorFormer with Docker Model Runner:
docker model run hf.co/Premchan369/Q-TensorFormer
Premchandyadav369
feat: SEO and discoverability expansion, viral launch kit, FAQ schema, and trending tags
7d566f9 |
Download SPACE_README.md from Premchan369/Q-TensorFormer: direct link, hf CLI and curl.
- Browser
- Download file 9.07 kB
-
https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/SPACE_README.md
- Command line
-
hf download hf://Premchan369/Q-TensorFormer/SPACE_README.md
-
curl -L -o SPACE_README.md https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/SPACE_README.md
9.07 kB
| title: Q-TensorFormer | |
| emoji: โ๏ธ | |
| colorFrom: indigo | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 6.30.0 | |
| python_version: '3.12' | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| short_description: Real-Time High-Throughput Edge LLM Inference | |
| models: | |
| - Premchan369/Q-TensorFormer | |
| tags: | |
| - edge-ai | |
| - reasoning | |
| - deepseek-style | |
| - openai-api | |
| - tensor-train | |
| - hardware-adaptive | |
| - green-ai | |
| - high-throughput | |
| - vit-ap-university | |
| # โ๏ธ Q-TensorFormer: Real-Time High-Throughput Edge LLM Inference | |
| [](https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/paper/q_tensorformer_ieee_paper.pdf) | |
| [](https://premchan369.github.io/Q-TensorFormer/) | |
| [](https://huggingface.co/Premchan369/Q-TensorFormer) | |
| [](https://colab.research.google.com/github/Premchan369/Q-TensorFormer/blob/main/notebooks/quickstart.ipynb) | |
| [](LICENSE) | |
| [](https://huggingface.co/Premchan369/Q-TensorFormer) | |
| Welcome to the live interactive research showcase of **Q-TensorFormer**, a real-time high-throughput edge LLM inference architecture developed by **Dr. Madala Guru Brahmam** (Assistant Professor) and **V C Premchand Yadav** (Final Year B.Tech CSE AIML) at **VIT-AP University**, Amaravati, Andhra Pradesh, India. | |
| > ๐ **Instant Paper Download:** [Download Camera-Ready 6-Page IEEE Conference Paper (PDF)](https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/paper/q_tensorformer_ieee_paper.pdf) | |
| > ๐ฆ **Pretrained Weights & Code:** [Premchan369/Q-TensorFormer on Hugging Face Hub](https://huggingface.co/Premchan369/Q-TensorFormer) | |
| ### What This Space Demonstrates: | |
| 1. **๐ Beginner & Layman Interactive Guide:** Test drive the automatic transmission AI car across driving conditions and explore the 5 core inventions with zero math. | |
| 2. **๐ฌ Live Dynamic Tensor-Train Slicing:** Type any prompt to watch the model slice Tensor-Train rank cores ($r \in [4, 16]$) token-by-token based on marginal informational value and target energy budgets with live lookahead horizon predictions. | |
| 3. **๐ฎ Edge Digital Twin & Predictive Future Forecaster:** Simulate real-time physical dynamics into the future (5 to 60 minutes) across 5 hardware platforms (Raspberry Pi 5, Jetson Orin Nano, Apple M3/M4, Drone MCU, Intel Core Ultra 7) forecasting junction temperature ($T_j$), thermal throttling cliffs, battery depletion, and zero-chattering rank evolution. | |
| 4. **๐ Autonomous Swarm & Global Fleet ROI Calculator:** Predict fleet survival across 10-100 edge nodes, and compute annual MWh saved, tons of CO2 avoided, and cloud hosting cost reductions. | |
| 5. **๐๏ธ Real-Time Dynamic SLA Controller Sandbox:** Test closed-loop PID disturbance rejection with live phase portraits and zero limit-cycle chattering ($\Delta V_t \le 0$). | |
| 6. **โก Zero-SVD Speculative Self-Drafting Engine:** Single-model self-speculative decoding simulator ($r_{\text{draft}}=1 \to r_{\text{target}}=4$) delivering $1.42\times$ acceleration with 0.00 MB extra DRAM allocation. | |
| 7. **๐ฌ Core Slicing & Singular Spectrum Inspector:** Direct mathematical inspection of TT core shapes ($\mathcal{G}^{(1)}, \mathcal{G}^{(2)}, \mathcal{G}^{(3)}$) and interactive singular value energy waterfall chart ($\sum_{i=1}^r \sigma_i^2 / \sum \sigma_i^2$), validating Theorem 1. | |
| 8. **๐๏ธ Multimodal Vision Projection:** Spatial-variance-guided visual patch ranking (Rank 16 for foreground, Rank 2 for background, 65.2% FLOP reduction). | |
| 9. **โก LLM Compression Studio:** Interactive parameter savings calculator for open-weight models (Llama-3, Qwen, Mistral). | |
| 10. **๐ NeurIPS & IEEE Research Deep-Dive & Paper Download:** 1-click download of the camera-ready 6-page IEEE conference paper PDF, plus interactive verification of Theorems 1-4 and 50-trial empirical hypothesis testing. | |
| - **Official Repository:** [https://huggingface.co/Premchan369/Q-TensorFormer](https://huggingface.co/Premchan369/Q-TensorFormer) | |
| - **Technical Documentation Portal:** [https://premchan369.github.io/Q-TensorFormer/](https://premchan369.github.io/Q-TensorFormer/) | |
| --- | |
| ## ๐ Beginner & Layman's Guide: How Q-TensorFormer Works (No Math Required) | |
| ### 1. The Big Problem: Why Today's AI Overheats Your Devices | |
| Imagine driving a car where the gas pedal is permanently glued to the floor at 150 mph - even when stopped at a red light. That is how standard LLMs run today: they spend the exact same massive computation and memory on simple filler words (like *"the"*, *"and"*) as on complex reasoning problems. | |
| ### 2. The Solution: The Smart Reader with Adaptive Gears | |
| **Q-TensorFormer** turns the model into an **adaptive reader equipped with automatic transmission, cruise control, and selective memory**. | |
|  | |
| *Figure 1: Complete end-to-end flow of Q-TensorFormer. Tokens enter, are measured by lightweight sensors, routed through compressed tensor layers, and regulated by closed-loop hardware feedback.* | |
| #### ๐ข Step 1: The Sensor Gauge | |
| Before spending compute, a lightweight sensor checks: *Is this word difficult? Is the battery low? Is memory running out?* | |
|  | |
| *Figure 2: Relative importance of the 8 real-time sensor signals.* | |
| #### ๐ข Step 2: Russian Nesting Dolls (Nested Tensor-Train Weights) | |
| Instead of huge flat matrices, weights are stored as compact tensor cores. For easy words, we open only the small inner doll (Rank 1 or 2); for hard words, we open the full doll (Rank 8 or 16). Slicing happens instantly in micro-seconds! | |
|  | |
| *Figure 3: Representation quality across nested Tensor-Train ranks.* | |
|  | |
| *Figure 4: Active rank directly controls latency and DRAM bus traffic.* | |
| #### ๐ข Step 3: Cruise Control with Anti-Pothole Buffer (Hysteresis PID Controller) | |
| A closed-loop PID controller prevents erratic speed spikes. A 0.15 hysteresis deadband ensures the model doesn't flicker between consecutive words, eliminating jitter. | |
|  | |
| *Figure 5: Closed-loop PID controller tracking target latency budgets.* | |
|  | |
| *Figure 6: Rank-switching chatter drops from 25.40% down to 0.00%.* | |
| #### ๐ข Step 4: The Selective Highlighter & Attic Trunk (Semantic Anchor KV Cache) | |
| Instead of keeping every past word in full memory, we keep the first 4 anchor words (attention sinks) and critical facts in crisp full fidelity, and compress the rest to 8-bit/4-bit integers. | |
|  | |
| *Figure 7: Memory vs attention fidelity curve.* | |
|  | |
| *Figure 8: Attention memory traffic reduction across context lengths.* | |
| #### ๐ข Step 5: The In-Kitchen Chef (Fused Hardware Contraction Engine) | |
| Instead of sending numbers back and forth to slow DRAM memory, our fused kernel keeps numbers directly in the processor's fast registers, cutting memory bus traffic by 96.90%! | |
|  | |
| *Figure 9: Arithmetic intensity and memory bandwidth roofline.* | |
| #### ๐ข Step 6: Multi-Dimensional Comparison Radar | |
|  | |
| *Figure 10: Multi-dimensional radar chart comparing Q-TensorFormer against standard dense baselines across parameter size, memory footprint, bus traffic, cold-start time, and energy efficiency.* | |