Text Generation
Transformers
Safetensors
phi3
torchwright
compiled-transformer
calculator_advanced
text-generation-inference
Instructions to use physicsrob/torchwright-calculator-advanced-max-digits-3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use physicsrob/torchwright-calculator-advanced-max-digits-3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="physicsrob/torchwright-calculator-advanced-max-digits-3")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("physicsrob/torchwright-calculator-advanced-max-digits-3") model = AutoModelForCausalLM.from_pretrained("physicsrob/torchwright-calculator-advanced-max-digits-3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use physicsrob/torchwright-calculator-advanced-max-digits-3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "physicsrob/torchwright-calculator-advanced-max-digits-3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "physicsrob/torchwright-calculator-advanced-max-digits-3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/physicsrob/torchwright-calculator-advanced-max-digits-3
- SGLang
How to use physicsrob/torchwright-calculator-advanced-max-digits-3 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 "physicsrob/torchwright-calculator-advanced-max-digits-3" \ --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": "physicsrob/torchwright-calculator-advanced-max-digits-3", "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 "physicsrob/torchwright-calculator-advanced-max-digits-3" \ --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": "physicsrob/torchwright-calculator-advanced-max-digits-3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use physicsrob/torchwright-calculator-advanced-max-digits-3 with Docker Model Runner:
docker model run hf.co/physicsrob/torchwright-calculator-advanced-max-digits-3
Upload folder using huggingface_hub
Browse files
config.json
CHANGED
|
@@ -27,11 +27,11 @@
|
|
| 27 |
},
|
| 28 |
"sliding_window": null,
|
| 29 |
"tie_word_embeddings": true,
|
| 30 |
-
"
|
| 31 |
-
"file": "
|
| 32 |
-
"format": "torchwright.
|
| 33 |
-
"schema": "
|
| 34 |
-
"support": "
|
| 35 |
},
|
| 36 |
"transformers_version": "5.12.1",
|
| 37 |
"use_cache": true,
|
|
|
|
| 27 |
},
|
| 28 |
"sliding_window": null,
|
| 29 |
"tie_word_embeddings": true,
|
| 30 |
+
"torchwright_schematic": {
|
| 31 |
+
"file": "torchwright_schematic.json",
|
| 32 |
+
"format": "torchwright.schematic.v1",
|
| 33 |
+
"schema": "torchwright_schematic_v1.schema.json",
|
| 34 |
+
"support": "torchwright_schematic_support.npz"
|
| 35 |
},
|
| 36 |
"transformers_version": "5.12.1",
|
| 37 |
"use_cache": true,
|
torchwright_truth.json → torchwright_schematic.json
RENAMED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
-
"$schema": "./
|
| 3 |
"artifact": {
|
| 4 |
"architecture": "phi3",
|
| 5 |
"files": {
|
| 6 |
"config.json": {
|
| 7 |
-
"bytes":
|
| 8 |
-
"sha256": "
|
| 9 |
},
|
| 10 |
"generation_config.json": {
|
| 11 |
"bytes": 105,
|
|
@@ -143,19 +143,19 @@
|
|
| 143 |
"bytes": 199,
|
| 144 |
"sha256": "6f9df026786c39bfda75becfa45ea655ccad3ee7bf4c4e186777e11aa930758b"
|
| 145 |
},
|
| 146 |
-
"
|
| 147 |
"bytes": 909442,
|
| 148 |
"sha256": "a1f439d473c33c5d6099ad815acc0dd18945e58fc49f06cc76d6cfc692098352"
|
| 149 |
},
|
| 150 |
-
"
|
| 151 |
-
"bytes":
|
| 152 |
-
"sha256": "
|
| 153 |
}
|
| 154 |
},
|
| 155 |
"kind": "huggingface_causal_lm_bundle"
|
| 156 |
},
|
| 157 |
"build": {
|
| 158 |
-
"compiler_code_sha256": "
|
| 159 |
"options": {
|
| 160 |
"activation": "swish",
|
| 161 |
"bias": false,
|
|
@@ -168,7 +168,7 @@
|
|
| 168 |
"optimize": 2,
|
| 169 |
"trim_heads": true
|
| 170 |
},
|
| 171 |
-
"schedule_fingerprint": "
|
| 172 |
"schedule_provenance": {
|
| 173 |
"delivery": "fresh",
|
| 174 |
"optimize": 2,
|
|
@@ -186,7 +186,7 @@
|
|
| 186 |
},
|
| 187 |
"torchwright_version": "unknown"
|
| 188 |
},
|
| 189 |
-
"format": "torchwright.
|
| 190 |
"graphs": {
|
| 191 |
"internal_nodes": [
|
| 192 |
{
|
|
@@ -83337,7 +83337,7 @@
|
|
| 83337 |
},
|
| 83338 |
"integrity": {
|
| 83339 |
"scope": "every manifest section except this one",
|
| 83340 |
-
"sha256": "
|
| 83341 |
},
|
| 83342 |
"intervention_contract": {
|
| 83343 |
"guarantee": "The manifest describes the unmodified compiled program. Interventions outside a node's stated value contract are not covered by torchwright's semantic or numerical guarantees.",
|
|
@@ -83700,7 +83700,7 @@
|
|
| 83700 |
}
|
| 83701 |
},
|
| 83702 |
"parameter_support": {
|
| 83703 |
-
"file": "
|
| 83704 |
"format": "torchwright.csr_support.v1",
|
| 83705 |
"sha256": "a1f439d473c33c5d6099ad815acc0dd18945e58fc49f06cc76d6cfc692098352",
|
| 83706 |
"tensors": {
|
|
|
|
| 1 |
{
|
| 2 |
+
"$schema": "./torchwright_schematic_v1.schema.json",
|
| 3 |
"artifact": {
|
| 4 |
"architecture": "phi3",
|
| 5 |
"files": {
|
| 6 |
"config.json": {
|
| 7 |
+
"bytes": 999,
|
| 8 |
+
"sha256": "37717c2991cc4a4bf9b3ead11dc7c561a446d1d0bc664095fb209141061df64b"
|
| 9 |
},
|
| 10 |
"generation_config.json": {
|
| 11 |
"bytes": 105,
|
|
|
|
| 143 |
"bytes": 199,
|
| 144 |
"sha256": "6f9df026786c39bfda75becfa45ea655ccad3ee7bf4c4e186777e11aa930758b"
|
| 145 |
},
|
| 146 |
+
"torchwright_schematic_support.npz": {
|
| 147 |
"bytes": 909442,
|
| 148 |
"sha256": "a1f439d473c33c5d6099ad815acc0dd18945e58fc49f06cc76d6cfc692098352"
|
| 149 |
},
|
| 150 |
+
"torchwright_schematic_v1.schema.json": {
|
| 151 |
+
"bytes": 3678,
|
| 152 |
+
"sha256": "1881c7400c00ee66e6e911c7416ceb573b31129cf24bb80d4055b9e2c647ec7f"
|
| 153 |
}
|
| 154 |
},
|
| 155 |
"kind": "huggingface_causal_lm_bundle"
|
| 156 |
},
|
| 157 |
"build": {
|
| 158 |
+
"compiler_code_sha256": "639e918d8b7011d6f247de3e5696cc4faaa3b154fe081a266f956ddaa9e68e1c",
|
| 159 |
"options": {
|
| 160 |
"activation": "swish",
|
| 161 |
"bias": false,
|
|
|
|
| 168 |
"optimize": 2,
|
| 169 |
"trim_heads": true
|
| 170 |
},
|
| 171 |
+
"schedule_fingerprint": "eb50446425f1908588859783fa8f0bc7ce59ffc72b35c88bfed766caaa07b508",
|
| 172 |
"schedule_provenance": {
|
| 173 |
"delivery": "fresh",
|
| 174 |
"optimize": 2,
|
|
|
|
| 186 |
},
|
| 187 |
"torchwright_version": "unknown"
|
| 188 |
},
|
| 189 |
+
"format": "torchwright.schematic.v1",
|
| 190 |
"graphs": {
|
| 191 |
"internal_nodes": [
|
| 192 |
{
|
|
|
|
| 83337 |
},
|
| 83338 |
"integrity": {
|
| 83339 |
"scope": "every manifest section except this one",
|
| 83340 |
+
"sha256": "c9d231ab4e43cf241333b68a2232b11ac652b6016edeba9fce85bc512fdc79f6"
|
| 83341 |
},
|
| 83342 |
"intervention_contract": {
|
| 83343 |
"guarantee": "The manifest describes the unmodified compiled program. Interventions outside a node's stated value contract are not covered by torchwright's semantic or numerical guarantees.",
|
|
|
|
| 83700 |
}
|
| 83701 |
},
|
| 83702 |
"parameter_support": {
|
| 83703 |
+
"file": "torchwright_schematic_support.npz",
|
| 83704 |
"format": "torchwright.csr_support.v1",
|
| 83705 |
"sha256": "a1f439d473c33c5d6099ad815acc0dd18945e58fc49f06cc76d6cfc692098352",
|
| 83706 |
"tensors": {
|
torchwright_truth_support.npz → torchwright_schematic_support.npz
RENAMED
|
File without changes
|
torchwright_truth_v1.schema.json → torchwright_schematic_v1.schema.json
RENAMED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 3 |
-
"$id": "https://github.com/physicsrob/torchwright/blob/main/torchwright/compiler/
|
| 4 |
-
"title": "torchwright compiled artifact
|
| 5 |
"type": "object",
|
| 6 |
"required": [
|
| 7 |
"format",
|
|
@@ -21,7 +21,7 @@
|
|
| 21 |
"reference_fixtures"
|
| 22 |
],
|
| 23 |
"properties": {
|
| 24 |
-
"format": {"const": "torchwright.
|
| 25 |
"$schema": {"type": "string"},
|
| 26 |
"integrity": {
|
| 27 |
"type": "object",
|
|
|
|
| 1 |
{
|
| 2 |
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 3 |
+
"$id": "https://github.com/physicsrob/torchwright/blob/main/torchwright/compiler/torchwright_schematic_v1.schema.json",
|
| 4 |
+
"title": "torchwright compiled artifact schematic v1",
|
| 5 |
"type": "object",
|
| 6 |
"required": [
|
| 7 |
"format",
|
|
|
|
| 21 |
"reference_fixtures"
|
| 22 |
],
|
| 23 |
"properties": {
|
| 24 |
+
"format": {"const": "torchwright.schematic.v1"},
|
| 25 |
"$schema": {"type": "string"},
|
| 26 |
"integrity": {
|
| 27 |
"type": "object",
|