Instructions to use apus-ailab/APUS-Reflex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use apus-ailab/APUS-Reflex with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("apus-ailab/APUS-Reflex", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download equations-source.json from apus-ailab/APUS-Reflex: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/apus-ailab/APUS-Reflex/resolve/refs%2Fpr%2F3/equations-source.json
- Command line
-
hf download hf://apus-ailab/APUS-Reflex@refs/pr/3/equations-source.json
-
curl -L -o equations-source.json https://huggingface.co/apus-ailab/APUS-Reflex/resolve/refs%2Fpr%2F3/equations-source.json
1.19 kB
| { | |
| "renderer": "matplotlib mathtext, STIX fonts, vector paths", | |
| "formulas": { | |
| "decision-distribution": [ | |
| "p_d(a_i\\mid x,A)=\\frac{\\exp(z_{d,i})}{\\sum_{j=1}^{K}\\exp(z_{d,j})}" | |
| ], | |
| "joint-depth-objective": [ | |
| "\\mathcal{L}_{\\mathrm{decision}}=0.5\\,\\mathrm{CE}(q,p_{\\mathrm{low}})+0.5\\,\\mathrm{CE}(q,p_{\\mathrm{high}})", | |
| "\\qquad +0.1\\,\\mathrm{KL}\\!\\left(\\mathrm{stopgrad}(p_{\\mathrm{high}})\\,\\Vert\\,p_{\\mathrm{low}}\\right)" | |
| ], | |
| "dcrl-objective": [ | |
| "\\mathcal{L}_{\\mathrm{DCRL}}=\\frac{1}{|\\mathcal{D}|}\\sum_{d\\in\\mathcal{D}}\\left[\\mathrm{NLL}(q,p_d)+\\lambda_B\\,\\mathrm{Brier}(q,p_d)\\right]", | |
| "\\qquad +\\lambda_{\\mathrm{ref}}\\,\\mathrm{KL}(p_{\\mathrm{high}}\\,\\Vert\\,p_{\\mathrm{reference}})", | |
| "\\qquad +\\lambda_U\\,\\mathcal{L}_{\\mathrm{utility}}(p_{\\mathrm{low}})" | |
| ], | |
| "expected-utility": [ | |
| "\\mathcal{L}_{\\mathrm{utility}}=-\\sum_{a\\in A(x)}p_{\\mathrm{low}}(a)\\,u(a)" | |
| ], | |
| "candidate-projection": [ | |
| "z_C=W[C]h_d+b[C]=(Wh_d+b)[C]" | |
| ], | |
| "projection-cost": [ | |
| "\\mathrm{Full\\ vocabulary}:\\ O(HV)\\qquad\\mathrm{Candidate\\ rows}:\\ O(HK)" | |
| ] | |
| } | |
| } | |