ai999x-encoder — a 4.9 MB capability encoder for science and mathematics questions
AI999X on Hugging Face · Capability orb (runs this model in your browser) · Website
License: Apache-2.0 · Author: Ibnul Jaif Farabi (creator and engineer) · Organization: AI999X · 4,715,520 parameters
ai999x-encoder turns a question written in plain English into a vector and finds which certified AI999X capability it is about — a formula, a procedure, a law — across every AI999X model at once. It is small enough to run offline on any CPU and in the browser, and it powers search() in every AI999X Python package and the capability orb.
Results
On 776 held-out questions it never saw in training (verified questions of the AI999X physics, mechanics and algebra models; the task: put the right one of 171 capabilities first):
| Model | Right capability first | In the top five |
|---|---|---|
| ai999x-encoder (4.7M parameters) | 0.890 | 0.977 |
| A commercial embedding API (its teacher) | 0.838 | 0.963 |
| bge-small-en-v1.5 (33M parameters) | 0.705 | 0.876 |
| Domain | first | top five |
|---|---|---|
| physics | 0.953 | 0.991 |
| mechanics | 0.800 | 1.000 |
| algebra | 0.732 | 0.917 |
Use it
The easiest way is through any AI999X package:
# pip install "physics-ai999x[search]"
import physics_ai999x as physics
physics.search("How long does a pendulum take to swing back and forth?", k=3)
Or directly with ONNX Runtime (Python, JavaScript, C#, Java, C++):
import numpy as np, onnxruntime as ort
from tokenizers import Tokenizer
tok = Tokenizer.from_file("tokenizer.json"); tok.enable_truncation(96)
sess = ort.InferenceSession("onnx/encoder.int8.onnx")
e = tok.encode("A rocket burns its fuel; how much does its speed change?")
v = sess.run(None, {"input_ids": np.array([e.ids], dtype=np.int64),
"attention_mask": np.array([e.attention_mask], dtype=np.int64)})[0][0]
# v is a unit vector (256 numbers); capability_index.json holds the vectors of every capability
Files
| File | What it is |
|---|---|
model.safetensors, config.json |
the weights (BERT-style encoder: 4 layers, 256 wide, mean pooling) |
onnx/encoder.int8.onnx |
4.9 MB int8 graph — ids and attention mask in, a unit vector out |
onnx/encoder.onnx |
the float32 graph |
tokenizer.json |
its own 8,000-token WordPiece vocabulary, learned from science and mathematics text |
capability_index.json |
every AI999X capability with its vector, name, model and an example question |
evaluation/report.json |
the measurements above |
Limits
- It finds capabilities; it does not answer. Answers come from the AI999X engines, which compute and check them.
- English, science and mathematics questions; it has not been trained for other text.
Created and engineered by Ibnul Jaif Farabi · AI999X · ai999x.com
- Downloads last month
- 5
Evaluation results
- right capability first on AI999X held-out verified questions: physicsself-reported0.953
- right capability in the top five on AI999X held-out verified questions: physicsself-reported0.991
- right capability first on AI999X held-out verified questions: mechanicsself-reported0.800
- right capability in the top five on AI999X held-out verified questions: mechanicsself-reported1.000
- right capability first on AI999X held-out verified questions: algebraself-reported0.732
- right capability in the top five on AI999X held-out verified questions: algebraself-reported0.917
- right capability first on AI999X held-out verified questions: overallself-reported0.890
- right capability in the top five on AI999X held-out verified questions: overallself-reported0.977