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
File size: 2,238 Bytes
0b7ee79 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # FUNCTIONAL VALIDATION REPORT: Deterministic Runtime Verification
**Date**: September 17, 2026
**Auditor**: Senior ML Systems Engineer & Research Software Auditor
**Final Status**: **`FUNCTIONAL_PASS`**
---
## 1. Tokenizer Status
```
TOKENIZER_STATUS = NOT_FOUND
TRACK_A_QUALITY_STATUS = UNAVAILABLE
```
- **Finding**: No pretrained tokenizer vocabulary files (`tokenizer.json`, `vocab.json`, `spm.model`) exist in the repository.
- **Protocol**: Per research software audit requirements, no external tokenizer was fabricated or substituted. All inputs for functional and latency testing are valid integer token tensors within the vocabulary bounds: $x \in \{0, \dots, V-1\}$ where $V = 10,000$.
---
## 2. Checkpoint Loading Gate Status
- **Target**: `qtensorformer_small.pt`
- **Result**: `CHECKPOINT_INCOMPATIBLE` (Proven in `CHECKPOINT_INTEGRITY_REPORT.md`).
- **Policy**: Functional validation is executed using the canonical architectural definition initialized deterministically, avoiding random hyperparameter guessing or silent weight substitution.
---
## 3. Shape & Finite Output Verification
Deterministic forward passes were executed across varying batch and sequence dimensions on CPU:
| Input Batch ($B$) | Sequence ($T$) | Integer Token Range | QTF Output Shape | Dense Output Shape | Output Dtype | Finite Check (NaN/Inf) | Status |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | 1 | $[0, 10000)$ | `[1, 1, 10000]` | `[1, 1, 10000]` | `torch.float32` | ALL FINITE (0 NaN, 0 Inf) | **PASS** |
| 1 | 8 | $[0, 10000)$ | `[1, 8, 10000]` | `[1, 8, 10000]` | `torch.float32` | ALL FINITE (0 NaN, 0 Inf) | **PASS** |
| 1 | 32 | $[0, 10000)$ | `[1, 32, 10000]` | `[1, 32, 10000]` | `torch.float32` | ALL FINITE (0 NaN, 0 Inf) | **PASS** |
---
## 4. Architectural Invariants Verified
1. **Batch Dimension**: Preserved across all forward layers without reshaping artifacts.
2. **Sequence Dimension**: Output sequence dimension matches input sequence dimension exactly.
3. **Vocabulary Dimension**: Logits projection maps to `vocab_size = 10000`.
4. **Numerical Stability**: Outputs contain zero `NaN` or `Inf` values across all test configurations.
**FINAL STATUS**: **`FUNCTIONAL_PASS`**
|