pranavkarthik10 commited on
Commit
b9c1500
·
verified ·
1 Parent(s): 4f9e004

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -72,8 +72,8 @@ the whole task cycle (no per-turn re-routing → no context thrash).
72
 
73
  | File | What |
74
  |---|---|
75
- | `tiny_router.int8.onnx` | int8-quantized graph — **recommended for serving** (~164 MB) |
76
- | `tiny_router.onnx` | fp32 graph (~540 MB) |
77
  | `model.pt` | PyTorch state dict — for fine-tuning / sub-dim outputs (~565 MB) |
78
  | `spm.model` + `*tokenizer*.json` | SentencePiece (DeBERTa-v2/spm) tokenizer |
79
  | `model_config.json` | architecture + label maps |
@@ -89,7 +89,7 @@ import numpy as np
89
  import onnxruntime as ort
90
  import sentencepiece as spm
91
 
92
- MODEL_DIR = "." # dir containing tiny_router.int8.onnx, spm.model, *.json
93
  MAX_LEN = 256
94
  LABELS = {
95
  "complexity_logits": ["easy", "medium", "hard"],
@@ -104,7 +104,7 @@ TEMPS = { # from temperature_scaling.json; output name -> head temperature
104
  }
105
 
106
  sp = spm.SentencePieceProcessor(model_file=f"{MODEL_DIR}/spm.model")
107
- sess = ort.InferenceSession(f"{MODEL_DIR}/tiny_router.int8.onnx",
108
  providers=["CPUExecutionProvider"])
109
 
110
  def classify(text: str) -> dict:
 
72
 
73
  | File | What |
74
  |---|---|
75
+ | `spawn_router.int8.onnx` | int8-quantized graph — **recommended for serving** (~164 MB) |
76
+ | `spawn_router.onnx` | fp32 graph (~540 MB) |
77
  | `model.pt` | PyTorch state dict — for fine-tuning / sub-dim outputs (~565 MB) |
78
  | `spm.model` + `*tokenizer*.json` | SentencePiece (DeBERTa-v2/spm) tokenizer |
79
  | `model_config.json` | architecture + label maps |
 
89
  import onnxruntime as ort
90
  import sentencepiece as spm
91
 
92
+ MODEL_DIR = "." # dir containing spawn_router.int8.onnx, spm.model, *.json
93
  MAX_LEN = 256
94
  LABELS = {
95
  "complexity_logits": ["easy", "medium", "hard"],
 
104
  }
105
 
106
  sp = spm.SentencePieceProcessor(model_file=f"{MODEL_DIR}/spm.model")
107
+ sess = ort.InferenceSession(f"{MODEL_DIR}/spawn_router.int8.onnx",
108
  providers=["CPUExecutionProvider"])
109
 
110
  def classify(text: str) -> dict: