Text Generation
Transformers
Safetensors
PyTorch
English
qtensorformer
q-tensorformer
tensor-train
tensor-networks
adaptive-computation
kv-cache
kv-cache-quantization
attention-sinks
pid-control
edge-ai
edge-inference
on-device-ai
model-compression
grouped-query-attention
rotary-position-embeddings
custom_code
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 results/raw/controller_audit.json from Premchan369/Q-TensorFormer: direct link, hf CLI and curl.
- Browser
- Download file 4.75 kB
-
https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/results/raw/controller_audit.json
- Command line
-
hf download hf://Premchan369/Q-TensorFormer/results/raw/controller_audit.json
-
curl -L -o controller_audit.json https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/results/raw/controller_audit.json
4.75 kB
| { | |
| "information_state_verification": { | |
| "low_variance_signal_Summary": { | |
| "entanglement_dispersion": 0.8542, | |
| "predictive_entropy": 0.854, | |
| "uncertainty": 0.5012, | |
| "attention_importance": 0.2924, | |
| "reconstruction_error": 0.1956, | |
| "latency_pressure": 0.3302, | |
| "memory_pressure": 0.3302, | |
| "bandwidth_pressure": 0.3302 | |
| }, | |
| "high_variance_signal_summary": { | |
| "entanglement_dispersion": 0.1458, | |
| "predictive_entropy": 0.6181, | |
| "uncertainty": 0.7575, | |
| "attention_importance": 0.2924, | |
| "reconstruction_error": 0.1956, | |
| "latency_pressure": 0.3302, | |
| "memory_pressure": 0.3302, | |
| "bandwidth_pressure": 0.3302 | |
| }, | |
| "ablation_verification": { | |
| "entanglement_dispersion": { | |
| "ablated_channel_max_val": 0.0, | |
| "l2_impact_on_z_t": 0.8249 | |
| }, | |
| "predictive_entropy": { | |
| "ablated_channel_max_val": 0.0, | |
| "l2_impact_on_z_t": 3.5497 | |
| }, | |
| "uncertainty": { | |
| "ablated_channel_max_val": 0.0, | |
| "l2_impact_on_z_t": 4.3095 | |
| }, | |
| "attention_importance": { | |
| "ablated_channel_max_val": 0.0, | |
| "l2_impact_on_z_t": 1.6539 | |
| }, | |
| "reconstruction_error": { | |
| "ablated_channel_max_val": 0.0, | |
| "l2_impact_on_z_t": 1.1063 | |
| }, | |
| "latency_pressure": { | |
| "ablated_channel_max_val": 0.0, | |
| "l2_impact_on_z_t": 1.8681 | |
| }, | |
| "memory_pressure": { | |
| "ablated_channel_max_val": 0.0, | |
| "l2_impact_on_z_t": 1.8681 | |
| }, | |
| "bandwidth_pressure": { | |
| "ablated_channel_max_val": 0.0, | |
| "l2_impact_on_z_t": 1.8681 | |
| } | |
| }, | |
| "scientific_classification": "MEASURED" | |
| }, | |
| "hysteresis_and_switching_audit": { | |
| "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" | |
| }, | |
| "pid_closed_loop_convergence": { | |
| "target_latency_ms": 1.5, | |
| "diagnostics": { | |
| "total_steps": 50, | |
| "violation_rate_pct": 34.0, | |
| "max_overshoot_pct": 18.52, | |
| "steady_state_error": 0.0282, | |
| "settling_step": 39 | |
| }, | |
| "initial_lambda_latency": 1.0, | |
| "final_lambda_latency": 1.5942, | |
| "scientific_classification": "SIMULATED" | |
| }, | |
| "counterfactual_policy_comparison": { | |
| "policies": { | |
| "fixed": { | |
| "average_reward": 0.4208, | |
| "regret_vs_oracle": 0.1422, | |
| "decision_accuracy_pct": 0.0, | |
| "constraint_violation_pct": 100.0, | |
| "avg_latency_ms": 1.85, | |
| "avg_memory_mb": 1.12, | |
| "avg_energy_uj": 8815.9 | |
| }, | |
| "entropy_only": { | |
| "average_reward": 0.3668, | |
| "regret_vs_oracle": 0.1962, | |
| "decision_accuracy_pct": 0.0, | |
| "constraint_violation_pct": 100.0, | |
| "avg_latency_ms": 1.505, | |
| "avg_memory_mb": 1.111, | |
| "avg_energy_uj": 8744.73 | |
| }, | |
| "heuristic": { | |
| "average_reward": 0.4085, | |
| "regret_vs_oracle": 0.1545, | |
| "decision_accuracy_pct": 0.0, | |
| "constraint_violation_pct": 100.0, | |
| "avg_latency_ms": 0.815, | |
| "avg_memory_mb": 0.844, | |
| "avg_energy_uj": 6641.12 | |
| }, | |
| "independent": { | |
| "average_reward": 0.3776, | |
| "regret_vs_oracle": 0.1854, | |
| "decision_accuracy_pct": 0.0, | |
| "constraint_violation_pct": 100.0, | |
| "avg_latency_ms": 1.566, | |
| "avg_memory_mb": 1.165, | |
| "avg_energy_uj": 9170.58 | |
| }, | |
| "learned": { | |
| "average_reward": 0.4495, | |
| "regret_vs_oracle": 0.1135, | |
| "decision_accuracy_pct": 0.0, | |
| "constraint_violation_pct": 100.0, | |
| "avg_latency_ms": 1.1, | |
| "avg_memory_mb": 0.655, | |
| "avg_energy_uj": 5155.06 | |
| }, | |
| "oracle": { | |
| "average_reward": 0.563, | |
| "regret_vs_oracle": 0.0, | |
| "decision_accuracy_pct": 100.0, | |
| "constraint_violation_pct": 100.0, | |
| "avg_latency_ms": 2.27, | |
| "avg_memory_mb": 0.889, | |
| "avg_energy_uj": 7005.53 | |
| } | |
| }, | |
| "scientific_classification": "SIMULATED" | |
| } | |
| } |