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(neurips-ieee): camera-ready publication artifacts, Theorems 1-4, 50-trial statistical significance, interactive deep-dive tab
6d1f076 Download scripts/scientific_integrity_checker.py from Premchan369/Q-TensorFormer: direct link, hf CLI and curl.
- Browser
- Download file 6.35 kB
-
https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/scripts/scientific_integrity_checker.py
- Command line
-
hf download hf://Premchan369/Q-TensorFormer/scripts/scientific_integrity_checker.py
-
curl -L -o scientific_integrity_checker.py https://huggingface.co/Premchan369/Q-TensorFormer/resolve/main/scripts/scientific_integrity_checker.py
6.35 kB
| #!/usr/bin/env python3 | |
| """ | |
| scripts/scientific_integrity_checker.py | |
| Automated Scientific Integrity & Evidence Classification Auditor (Phase 12). | |
| Verifies: | |
| 1. All required reports in reports/ and raw benchmark files in results/raw/ exist and are non-empty. | |
| 2. Every benchmark block in results/raw/*.json includes a valid scientific_classification label. | |
| 3. Production checkpoint loaders (qtensorformer_to_gguf.py, configuration_qtensorformer.py) | |
| do not use strict=False or ignore missing embedding weights. | |
| 4. Documentation (README.md, MODEL_CARD.md, reports/*.md) contains no forbidden promotional | |
| claims and has zero broken Markdown tables or unbalanced LaTeX $$ blocks. | |
| """ | |
| import json | |
| import sys | |
| from pathlib import Path | |
| from typing import List | |
| ROOT_DIR = Path(__file__).resolve().parent.parent | |
| REQUIRED_REPORTS = [ | |
| "BASELINE_AUDIT.md", | |
| "REPOSITORY_INVENTORY.md", | |
| "EXISTING_FAILURES.md", | |
| "ARCHITECTURE_FAMILY_MAP.md", | |
| "CLAIM_TO_CODE_MAP.md", | |
| "SOURCE_API_AUDIT.md", | |
| "CONFIG_PROVENANCE.md", | |
| "CHECKPOINT_INTEGRITY.md", | |
| "CANONICAL_MODEL_DECISION.md", | |
| "COLD_START_EVALUATION.md", | |
| "EDGE_INFERENCE_EVALUATION.md", | |
| "ENERGY_MEASUREMENT_METHODOLOGY.md", | |
| "BENCHMARK_PROTOCOL.md", | |
| "BASELINE_FAIRNESS.md", | |
| "BENCHMARK_RESULTS.md", | |
| "TEST_COVERAGE.md", | |
| "SCIENTIFIC_INTEGRITY_AUDIT.md", | |
| "RELATED_WORK_AND_NOVELTY.md", | |
| "FINAL_RESEARCH_AUDIT.md", | |
| "RELEASE_READINESS.md", | |
| "KNOWN_LIMITATIONS.md", | |
| "REPRODUCIBILITY_CHECKLIST.md", | |
| "FRONTIER_RESEARCH_BENCHMARKS.md", | |
| "NEURIPS_CAMERA_READY_PAPER.md", | |
| ] | |
| REQUIRED_RAW_JSON = [ | |
| "checkpoint_integrity.json", | |
| "cold_start_and_edge.json", | |
| "tt_compression_audit.json", | |
| "controller_audit.json", | |
| "kv_cache_audit.json", | |
| "quantum_pathway_audit.json", | |
| "frontier_research_benchmarks.json", | |
| "neurips_statistical_evaluation.json", | |
| ] | |
| ALLOWED_LABELS = { | |
| "MEASURED", | |
| "ESTIMATED", | |
| "SIMULATED", | |
| "THEORETICAL", | |
| "PROJECTED", | |
| "N/A", | |
| "BLOCKED", | |
| "UNVERIFIED", | |
| } | |
| FORBIDDEN_CLAIMS = [ | |
| "guaranteed energy savings", | |
| "quantum speedup on cpu", | |
| "quantum advantage in nlp", | |
| "zero runtime overhead", | |
| "first ever adaptive transformer", | |
| "asymptotic pareto optimality guaranteed", | |
| ] | |
| def check_markdown_tables_and_math(file_path: Path, errors: List[str]): | |
| text = file_path.read_text(encoding="utf-8") | |
| lines = text.splitlines() | |
| # Check $$ display math balance outside fenced code blocks | |
| in_code = False | |
| dd_count = 0 | |
| in_table = False | |
| expected_cols = 0 | |
| for idx, line in enumerate(lines, start=1): | |
| stripped = line.strip() | |
| if stripped.startswith("```"): | |
| in_code = not in_code | |
| in_table = False | |
| continue | |
| if in_code: | |
| continue | |
| dd_count += line.count("$$") | |
| if stripped.startswith("|") and stripped.endswith("|"): | |
| cols = len([c for c in stripped.split("|")[1:-1]]) | |
| if not in_table: | |
| in_table = True | |
| expected_cols = cols | |
| else: | |
| if cols != expected_cols: | |
| errors.append( | |
| f"[{file_path.name}:{idx}] Table column mismatch: expected {expected_cols} columns, got {cols}" | |
| ) | |
| else: | |
| in_table = False | |
| if dd_count % 2 != 0: | |
| errors.append( | |
| f"[{file_path.name}] Unbalanced $$ display math delimiters (count={dd_count})" | |
| ) | |
| # Check forbidden promotional phrases (ignoring lines that explicitly list them as forbidden) | |
| for idx, line in enumerate(lines, start=1): | |
| low = line.lower() | |
| if "forbidden" in low or "prohibit" in low or "rejects" in low: | |
| continue | |
| for phrase in FORBIDDEN_CLAIMS: | |
| if phrase in low: | |
| errors.append( | |
| f"[{file_path.name}:{idx}] Forbidden promotional phrase detected: '{phrase}'" | |
| ) | |
| def main(): | |
| errors: List[str] = [] | |
| # 1. Check required reports | |
| reports_dir = ROOT_DIR / "reports" | |
| for rname in REQUIRED_REPORTS: | |
| rpath = reports_dir / rname | |
| if not rpath.exists() or rpath.stat().st_size < 100: | |
| errors.append(f"Missing or empty report: reports/{rname}") | |
| else: | |
| check_markdown_tables_and_math(rpath, errors) | |
| # 2. Check required raw JSON files and scientific classifications | |
| raw_dir = ROOT_DIR / "results" / "raw" | |
| for jname in REQUIRED_RAW_JSON: | |
| jpath = raw_dir / jname | |
| if not jpath.exists(): | |
| errors.append(f"Missing raw benchmark file: results/raw/{jname}") | |
| continue | |
| data = json.loads(jpath.read_text(encoding="utf-8")) | |
| raw_str = json.dumps(data) | |
| if "scientific_classification" not in raw_str: | |
| errors.append(f"results/raw/{jname} lacks 'scientific_classification' labels") | |
| # 3. Check production source files for strict=False bypasses | |
| gguf_src = (ROOT_DIR / "qtensorformer_to_gguf.py").read_text(encoding="utf-8") | |
| if "strict=False" in gguf_src: | |
| errors.append("qtensorformer_to_gguf.py contains forbidden 'strict=False'") | |
| cfg_src = (ROOT_DIR / "configuration_qtensorformer.py").read_text(encoding="utf-8") | |
| if 'keys_to_ignore_at_loading = ["model.embed_tokens.weight"]' in cfg_src: | |
| errors.append( | |
| "configuration_qtensorformer.py still ignores model.embed_tokens.weight at loading" | |
| ) | |
| # 4. Check README.md and MODEL_CARD.md | |
| for doc_name in ["README.md", "MODEL_CARD.md"]: | |
| doc_path = ROOT_DIR / doc_name | |
| if not doc_path.exists(): | |
| errors.append(f"Missing {doc_name}") | |
| else: | |
| check_markdown_tables_and_math(doc_path, errors) | |
| print("=" * 70) | |
| print("Q-TensorFormer — Automated Scientific Integrity Audit") | |
| print("=" * 70) | |
| print(f"Reports Verified: {len(REQUIRED_REPORTS)}") | |
| print(f"Raw JSON Verified: {len(REQUIRED_RAW_JSON)}") | |
| print(f"Integrity Errors: {len(errors)}") | |
| if errors: | |
| for e in errors: | |
| print(f" [FAIL] {e}") | |
| sys.exit(1) | |
| else: | |
| print("[PASS] Zero scientific integrity violations, zero broken tables/equations.") | |
| print("=" * 70) | |
| if __name__ == "__main__": | |
| main() | |