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: complete scientific repair, canonical checkpoint training, tokenizer, GQA zero-copy, and release gating
d279df0 Download results/processed/benchmark_summary.json from Premchan369/Q-TensorFormer: direct link, hf CLI and curl.
- Browser
- Download file 12.1 kB
-
https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/results/processed/benchmark_summary.json
- Command line
-
hf download hf://Premchan369/Q-TensorFormer/results/processed/benchmark_summary.json
-
curl -L -o benchmark_summary.json https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/results/processed/benchmark_summary.json
12.1 kB
| { | |
| "run_id": "RUN-20261013-QTF-HARDENING", | |
| "timestamp_utc": "2026-10-13T11:31:00.528819+00:00", | |
| "checkpoint_strict_load_qtensorformer_small_pt": "FAIL (0/113 key overlap; external TensorLy format)", | |
| "canonical_roundtrip_strict_load": "PASS (100% key match on both src.models.QTensorFormer and HF QTensorFormerForCausalLM)", | |
| "cold_start_summary": { | |
| "DenseBaseline_FP32": { | |
| "dtype": "float32", | |
| "total_params": 5719552, | |
| "active_params": 5719552, | |
| "checkpoint_size_bytes": 23158853, | |
| "checkpoint_size_mb": 22.086, | |
| "parameter_memory_mb": 21.818, | |
| "buffer_memory_mb": 0.25, | |
| "serialization_save_ms": 122.707, | |
| "model_init_ms_mean": 177.8, | |
| "model_init_ms_std": 7.749, | |
| "deserialization_load_ms_mean": 39.181, | |
| "deserialization_load_ms_std": 9.724, | |
| "load_state_dict_ms_mean": 7.49, | |
| "ttft_L16_ms_mean": 14.206, | |
| "ttft_L64_ms_mean": 23.018, | |
| "ttft_L128_ms_mean": 33.023, | |
| "total_cold_start_to_first_token_ms_mean": 238.693, | |
| "total_cold_start_to_first_token_ms_std": 18.245, | |
| "steady_state_tpot_ms_mean": 13.184, | |
| "steady_state_tpot_ms_p50": 13.133, | |
| "steady_state_tpot_ms_p95": 14.224, | |
| "steady_state_tpot_ms_p99": 14.759, | |
| "decode_tokens_per_sec": 75.85, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "QTensorFormer_Balanced_r8_FP32": { | |
| "dtype": "float32", | |
| "total_params": 3927288, | |
| "active_params": 3927288, | |
| "checkpoint_size_bytes": 16063757, | |
| "checkpoint_size_mb": 15.32, | |
| "parameter_memory_mb": 14.981, | |
| "buffer_memory_mb": 0.251, | |
| "serialization_save_ms": 62.51, | |
| "model_init_ms_mean": 177.269, | |
| "model_init_ms_std": 3.647, | |
| "deserialization_load_ms_mean": 95.486, | |
| "deserialization_load_ms_std": 15.497, | |
| "load_state_dict_ms_mean": 16.578, | |
| "ttft_L16_ms_mean": 48.402, | |
| "ttft_L64_ms_mean": 61.623, | |
| "ttft_L128_ms_mean": 78.757, | |
| "total_cold_start_to_first_token_ms_mean": 337.758, | |
| "total_cold_start_to_first_token_ms_std": 18.213, | |
| "steady_state_tpot_ms_mean": 45.854, | |
| "steady_state_tpot_ms_p50": 43.697, | |
| "steady_state_tpot_ms_p95": 54.145, | |
| "steady_state_tpot_ms_p99": 54.674, | |
| "decode_tokens_per_sec": 21.81, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "QTensorFormer_Edge_r2_FP32": { | |
| "dtype": "float32", | |
| "total_params": 3726648, | |
| "active_params": 3726648, | |
| "checkpoint_size_bytes": 15259941, | |
| "checkpoint_size_mb": 14.553, | |
| "parameter_memory_mb": 14.216, | |
| "buffer_memory_mb": 0.251, | |
| "serialization_save_ms": 62.986, | |
| "model_init_ms_mean": 185.234, | |
| "model_init_ms_std": 11.478, | |
| "deserialization_load_ms_mean": 92.962, | |
| "deserialization_load_ms_std": 9.862, | |
| "load_state_dict_ms_mean": 16.681, | |
| "ttft_L16_ms_mean": 69.328, | |
| "ttft_L64_ms_mean": 117.198, | |
| "ttft_L128_ms_mean": 117.126, | |
| "total_cold_start_to_first_token_ms_mean": 364.231, | |
| "total_cold_start_to_first_token_ms_std": 34.847, | |
| "steady_state_tpot_ms_mean": 43.157, | |
| "steady_state_tpot_ms_p50": 42.56, | |
| "steady_state_tpot_ms_p95": 47.716, | |
| "steady_state_tpot_ms_p99": 48.762, | |
| "decode_tokens_per_sec": 23.17, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "HF_QTensorFormer_GQA_r8_FP32": { | |
| "dtype": "float32", | |
| "total_params": 5852928, | |
| "active_params": 5852928, | |
| "checkpoint_size_bytes": 23438743, | |
| "checkpoint_size_mb": 22.353, | |
| "parameter_memory_mb": 22.327, | |
| "buffer_memory_mb": 0.0, | |
| "serialization_save_ms": 54.89, | |
| "model_init_ms_mean": 185.874, | |
| "model_init_ms_std": 28.925, | |
| "deserialization_load_ms_mean": 52.072, | |
| "deserialization_load_ms_std": 15.219, | |
| "load_state_dict_ms_mean": 7.47, | |
| "ttft_L16_ms_mean": 46.247, | |
| "ttft_L64_ms_mean": 65.978, | |
| "ttft_L128_ms_mean": 104.579, | |
| "total_cold_start_to_first_token_ms_mean": 291.679, | |
| "total_cold_start_to_first_token_ms_std": 50.932, | |
| "steady_state_tpot_ms_mean": 16.608, | |
| "steady_state_tpot_ms_p50": 16.354, | |
| "steady_state_tpot_ms_p95": 18.076, | |
| "steady_state_tpot_ms_p99": 19.074, | |
| "decode_tokens_per_sec": 60.21, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "HF_QTensorFormer_GQA_r8_FP16": { | |
| "dtype": "float16", | |
| "total_params": 5852928, | |
| "active_params": 5852928, | |
| "checkpoint_size_bytes": 11732887, | |
| "checkpoint_size_mb": 11.189, | |
| "parameter_memory_mb": 11.164, | |
| "buffer_memory_mb": 0.0, | |
| "serialization_save_ms": 20.755, | |
| "model_init_ms_mean": 136.142, | |
| "model_init_ms_std": 6.311, | |
| "deserialization_load_ms_mean": 26.226, | |
| "deserialization_load_ms_std": 9.83, | |
| "load_state_dict_ms_mean": 4.243, | |
| "ttft_L16_ms_mean": 339.122, | |
| "ttft_L64_ms_mean": 1281.813, | |
| "ttft_L128_ms_mean": 2532.387, | |
| "total_cold_start_to_first_token_ms_mean": 505.744, | |
| "total_cold_start_to_first_token_ms_std": 23.898, | |
| "steady_state_tpot_ms_mean": 32.095, | |
| "steady_state_tpot_ms_p50": 31.729, | |
| "steady_state_tpot_ms_p95": 33.534, | |
| "steady_state_tpot_ms_p99": 36.762, | |
| "decode_tokens_per_sec": 31.16, | |
| "scientific_classification": "MEASURED" | |
| } | |
| }, | |
| "tt_compression_summary": { | |
| "rank_1": { | |
| "rank": 1, | |
| "active_params": 18444, | |
| "active_weight_bytes_fp32": 73776, | |
| "compression_ratio_vs_dense": 56.96, | |
| "param_reduction_pct": 98.24, | |
| "contraction_vs_reconstructed_matrix_max_abs_err": 0.0, | |
| "truncation_rel_frobenius_err_vs_r16": 1.0001, | |
| "output_rel_l2_err_vs_r16": 1.0001, | |
| "output_mse_vs_r16": 0.222335, | |
| "decode_B1_T1_ms_mean": 0.8833, | |
| "decode_B1_T1_ms_std": 0.0361, | |
| "prefill_B4_T64_ms_mean": 5.8327, | |
| "prefill_B4_T64_ms_std": 0.0943, | |
| "core_grad_norms": [ | |
| 8.4e-05, | |
| 9.1e-05, | |
| 0.000237, | |
| 1.3e-05 | |
| ], | |
| "gradients_valid_and_finite": true, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "rank_2": { | |
| "rank": 2, | |
| "active_params": 34856, | |
| "active_weight_bytes_fp32": 139424, | |
| "compression_ratio_vs_dense": 30.14, | |
| "param_reduction_pct": 96.68, | |
| "contraction_vs_reconstructed_matrix_max_abs_err": 1e-07, | |
| "truncation_rel_frobenius_err_vs_r16": 0.9993, | |
| "output_rel_l2_err_vs_r16": 0.9993, | |
| "output_mse_vs_r16": 0.221982, | |
| "decode_B1_T1_ms_mean": 0.9745, | |
| "decode_B1_T1_ms_std": 0.0609, | |
| "prefill_B4_T64_ms_mean": 4.2969, | |
| "prefill_B4_T64_ms_std": 0.1178, | |
| "core_grad_norms": [ | |
| 0.0009, | |
| 0.001459, | |
| 0.001188, | |
| 0.000197 | |
| ], | |
| "gradients_valid_and_finite": true, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "rank_4": { | |
| "rank": 4, | |
| "active_params": 67728, | |
| "active_weight_bytes_fp32": 270912, | |
| "compression_ratio_vs_dense": 15.51, | |
| "param_reduction_pct": 93.55, | |
| "contraction_vs_reconstructed_matrix_max_abs_err": 4e-07, | |
| "truncation_rel_frobenius_err_vs_r16": 0.9942, | |
| "output_rel_l2_err_vs_r16": 0.9941, | |
| "output_mse_vs_r16": 0.21965, | |
| "decode_B1_T1_ms_mean": 1.0353, | |
| "decode_B1_T1_ms_std": 0.0555, | |
| "prefill_B4_T64_ms_mean": 5.5641, | |
| "prefill_B4_T64_ms_std": 0.184, | |
| "core_grad_norms": [ | |
| 0.00964, | |
| 0.009835, | |
| 0.006892, | |
| 0.001942 | |
| ], | |
| "gradients_valid_and_finite": true, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "rank_8": { | |
| "rank": 8, | |
| "active_params": 133664, | |
| "active_weight_bytes_fp32": 534656, | |
| "compression_ratio_vs_dense": 7.86, | |
| "param_reduction_pct": 87.28, | |
| "contraction_vs_reconstructed_matrix_max_abs_err": 5e-07, | |
| "truncation_rel_frobenius_err_vs_r16": 0.9292, | |
| "output_rel_l2_err_vs_r16": 0.9289, | |
| "output_mse_vs_r16": 0.191769, | |
| "decode_B1_T1_ms_mean": 1.1157, | |
| "decode_B1_T1_ms_std": 0.053, | |
| "prefill_B4_T64_ms_mean": 7.8408, | |
| "prefill_B4_T64_ms_std": 0.5244, | |
| "core_grad_norms": [ | |
| 0.04524, | |
| 0.038735, | |
| 0.026589, | |
| 0.010933 | |
| ], | |
| "gradients_valid_and_finite": true, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "rank_16": { | |
| "rank": 16, | |
| "active_params": 266304, | |
| "active_weight_bytes_fp32": 1065216, | |
| "compression_ratio_vs_dense": 3.95, | |
| "param_reduction_pct": 74.65, | |
| "contraction_vs_reconstructed_matrix_max_abs_err": 1.3e-06, | |
| "truncation_rel_frobenius_err_vs_r16": 0.0, | |
| "output_rel_l2_err_vs_r16": 0.0, | |
| "output_mse_vs_r16": 0.0, | |
| "decode_B1_T1_ms_mean": 1.498, | |
| "decode_B1_T1_ms_std": 0.0924, | |
| "prefill_B4_T64_ms_mean": 13.6219, | |
| "prefill_B4_T64_ms_std": 0.4831, | |
| "core_grad_norms": [ | |
| 0.248692, | |
| 0.188907, | |
| 0.120362, | |
| 0.070375 | |
| ], | |
| "gradients_valid_and_finite": true, | |
| "scientific_classification": "MEASURED" | |
| } | |
| }, | |
| "dense_linear_baseline": { | |
| "params": 1050624, | |
| "weight_bytes_fp32": 4202496, | |
| "decode_B1_T1_ms_mean": 0.1851, | |
| "decode_B1_T1_ms_std": 0.0229, | |
| "prefill_B4_T64_ms_mean": 3.5434, | |
| "prefill_B4_T64_ms_std": 0.1719, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "hysteresis_summary": { | |
| "steps_evaluated": 64, | |
| "no_hysteresis_tau_0_00": { | |
| "switch_rate_pct": 25.4, | |
| "mean_rank": 3.484, | |
| "rank_trajectory_head": [ | |
| 4, | |
| 4, | |
| 4, | |
| 1, | |
| 4, | |
| 4, | |
| 1, | |
| 1, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4 | |
| ] | |
| }, | |
| "with_hysteresis_tau_0_15": { | |
| "switch_rate_pct": 0.0, | |
| "mean_rank": 4.0, | |
| "rank_trajectory_head": [ | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4 | |
| ] | |
| }, | |
| "simple_entropy_threshold": { | |
| "switch_rate_pct": 11.11, | |
| "mean_rank": 5.0 | |
| }, | |
| "random_policy": { | |
| "switch_rate_pct": 63.49, | |
| "mean_rank": 4.156 | |
| }, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "kv_cache_L1024_summary": { | |
| "seq_len": 1024, | |
| "fp16_full": { | |
| "bytes": 524288, | |
| "update_ms": 0.583, | |
| "k_mse": 5e-08, | |
| "attn_out_cosine_sim": 1.0 | |
| }, | |
| "int8_full": { | |
| "bytes": 278528, | |
| "compression_ratio_vs_fp16": 1.88, | |
| "update_ms": 2.118, | |
| "k_mse": 3e-05, | |
| "attn_out_cosine_sim": 0.999973 | |
| }, | |
| "int4_packed_full": { | |
| "bytes": 163840, | |
| "compression_ratio_vs_fp16": 3.2, | |
| "update_ms": 4.185, | |
| "k_mse": 0.006429, | |
| "attn_out_cosine_sim": 0.995593 | |
| }, | |
| "sink_protected_int8_cap128": { | |
| "retained_tokens": 128, | |
| "evicted_tokens": 896, | |
| "bytes": 34816, | |
| "memory_reduction_vs_fp16_pct": 93.36, | |
| "update_ms": 1.263, | |
| "attn_out_cosine_sim_vs_full": 0.996337 | |
| }, | |
| "sliding_window_no_sink_cap128": { | |
| "retained_tokens": 128, | |
| "attn_out_cosine_sim_vs_full": 0.004714 | |
| }, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "quantum_pathway_summary": { | |
| "Classical_Only": { | |
| "preset": "QTF_CLASSICAL_ONLY", | |
| "quantum_routed_tokens_pct": 0.0, | |
| "latency_ms_mean": 8.473, | |
| "latency_ms_std": 0.214, | |
| "logit_l2_diff_vs_classical": 0.0, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "Selective_Quantum_Surrogate": { | |
| "preset": "QTF_BALANCED", | |
| "quantum_routed_tokens_pct": 0.0, | |
| "latency_ms_mean": 8.401, | |
| "latency_ms_std": 0.161, | |
| "latency_overhead_pct_vs_classical": -0.86, | |
| "logit_l2_diff_vs_classical": 0.0, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "Forced_Quantum_QKSAM_Surrogate": { | |
| "preset": "QTF_FULL (use_quantum_kernel=True)", | |
| "quantum_routed_tokens_pct": 50.0, | |
| "latency_ms_mean": 9.029, | |
| "latency_ms_std": 0.151, | |
| "latency_overhead_pct_vs_classical": 6.56, | |
| "logit_l2_diff_vs_classical": 10.1549, | |
| "scientific_classification": "MEASURED" | |
| } | |
| } | |
| } |