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
Complete 16-phase scientific hardening, strict checkpoint audit, empirical benchmarks, and documentation
7aefd9e |
Download reports/CHECKPOINT_INTEGRITY.md from Premchan369/Q-TensorFormer: direct link, hf CLI and curl.
- Browser
- Download file 3.54 kB
-
https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/reports/CHECKPOINT_INTEGRITY.md
- Command line
-
hf download hf://Premchan369/Q-TensorFormer/reports/CHECKPOINT_INTEGRITY.md
-
curl -L -o CHECKPOINT_INTEGRITY.md https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/reports/CHECKPOINT_INTEGRITY.md
3.54 kB
Phase Two — Checkpoint Integrity & Strict-Load Audit Report
1. Forensic Inspection of qtensorformer_small.pt
Data source: results/raw/checkpoint_integrity.json (MEASURED).
- File Path:
qtensorformer_small.pt - File Size:
5,432,305bytes (5.18 MB) - SHA-256 Digest:
9a4e61f70ba084e6c4e38b3e7cc8479d1f2ff43c51fff7bcf2ee07191dc3b0db - Git Provenance: Committed in
82fd973c(May 6, 2026) from an external container (/app/qtensorformer). - Top-Level Dictionary Keys:
['model_state_dict', 'config', 'params', 'baseline_params', 'compression_ratio', 'version'] - Recorded Metadata:
version:"1.0.0"params:1,347,747baseline_params:16,146,432compression_ratio:11.9803
- Actual State-Dict Structure:
- Contains
113tensors summing to exactly1,347,747elements. - Sample keys:
embeddings.token_embedding.weight([10000, 128])embeddings.position_embedding.weight([64, 128])embeddings.quantum_enhancer.qlayer.weights([2, 4])blocks.0.attention.q_proj.weight([128, 128])blocks.0.ffn.layer.weight.factors.factor_0..factor_5(TensorLyFactorizedTensorformat)blocks.0.ffn.rank_scheduler.net.0.weight
- Contains
2. Canonical strict=True Loading Test Results
Per Phase Two rules, model.load_state_dict(sd, strict=True) was executed against the repository's canonical implementations without altering checkpoint tensors or model dimensions:
| Target Model Class | Config Class | Model Params | Model Keys | Checkpoint Keys | Exact Key Overlap | Missing Keys | Unexpected Keys | strict=True Result |
|---|---|---|---|---|---|---|---|---|
src.models.QTensorFormer |
src.config.ModelConfig |
1,524,186 |
185 |
113 |
0 (0.0%) |
185 |
113 |
FAIL (RuntimeError) |
modeling_qtensorformer.QTensorFormerForCausalLM |
QTensorFormerConfig |
2,767,296 |
52 |
113 |
0 (0.0%) |
52 |
113 |
FAIL (RuntimeError) |
Why qtensorformer_small.pt Cannot Load Under strict=True
- Incompatible Tensor Factorization Library:
qtensorformer_small.ptstores FFN weights usingtensorly/tltorch6-corefactors.factor_0..5naming on a single fused FFN layer (blocks.i.ffn.layer), whereassrc.tensor_layers.TTFeedForwarduses two 4-core pure-PyTorchTTLinearprojections (blocks.i.tt_ffn.up_proj.cores.0..3andblocks.i.tt_ffn.down_proj.cores.0..3). - Different Module Hierarchy:
qtensorformer_small.ptusesembeddings.token_embeddingandblocks.i.ffn.rank_scheduler.net, whereassrc.models.QTensorFormerusesembedding.weight,blocks.i.info_engine, andblocks.i.allocator.
3. Canonical Round-Trip strict=True Verification
While the legacy external file qtensorformer_small.pt is incompatible, both canonical repository architectures pass strict=True save/load round-trip verification (results/raw/checkpoint_integrity.json and scripts/smoke_test.py):
| Canonical Implementation | Serialization Method | Reload Method | strict=True Result |
Output Numerical Match |
|---|---|---|---|---|
src.models.QTensorFormer |
torch.save(model.state_dict(), path) |
model.load_state_dict(sd, strict=True) |
PASS (185/185 keys) |
Max diff 0.0 |
modeling_qtensorformer.QTensorFormerForCausalLM |
model.save_pretrained(dir) |
QTensorFormerForCausalLM.from_pretrained(dir) |
PASS (52/52 keys) |
Max diff < 1e-6 |