Модель для соревнования DigitalEdu с использованием трансформеров. 9 эпох. Пример вывода: [False, True]
Search public pages, research tools, and SAVRN solutions.
Model is avaliable at https://huggingface.co/yzhuang/MetaTree 1. Install metatreelib: 2.
What it takes to serve MetaTree (151M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.3 GB | 0.4 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.2 GB | 0.2 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.1 GB | 0.1 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.
By Yufan Zhuang, published under mit, revision 6707faaf97af.
Model is avaliable at https://huggingface.co/yzhuang/MetaTree 1. Install metatreelib: 2. Use MetaTree on your datasets to generate a decision tree model We show a complete example of using MetaTree at notebook If you have any questions related to the code or the paper, feel free to reach out to us at [email protected]. If you find our paper and code useful, please cite us
Learning a Decision Tree Algorithm with Transformers (Zhuang et al. 2024).
MetaTree is a transformer-based decision tree algorithm. It learns from classical decision tree algorithms (greedy algorithm CART, optimal algorithm GOSDT), for better generalization capabilities.
Model is avaliable at https://huggingface.co/yzhuang/MetaTree
metatreelib:pip install metatreelib
# Alternatively,
# clone then pip install -e .
# pip install git+https://github.com/EvanZhuang/MetaTree
from metatree.model_metatree import LlamaForMetaTree as MetaTree
from metatree.decision_tree_class import DecisionTree, DecisionTreeForest
from metatree.run_train import preprocess_dimension_patch
from transformers import AutoConfig
import imodels # pip install imodels
# Initialize Model
model_name_or_path = "yzhuang/MetaTree"
config = AutoConfig.from_pretrained(model_name_or_path)
model = MetaTree.from_pretrained(
model_name_or_path,
config=config,
)
decision_tree_forest = DecisionTreeForest()
# Load Datasets
X, y, feature_names = imodels.get_clean_dataset('fico', data_source='imodels')
print("Dataset Shapes X={}, y={}, Num of Classes={}".format(X.shape, y.shape, len(set(y))))
train_idx, test_idx = sklearn.model_selection.train_test_split(range(X.shape[0]), test_size=0.3, random_state=seed)
# Dimension Subsampling
feature_idx = np.random.choice(X.shape[1], 10, replace=False)
X = X[:, feature_idx]
test_X, test_y = X[test_idx], y[test_idx]
# Sample Train and Test Data
subset_idx = random.sample(train_idx, 256)
train_X, train_y = X[subset_idx], y[subset_idx]
input_x = torch.tensor(train_X, dtype=torch.float32)
input_y = torch.nn.functional.one_hot(torch.tensor(train_y)).float()
batch = {"input_x": input_x, "input_y": input_y, "input_y_clean": input_y}
batch = preprocess_dimension_patch(batch, n_feature=10, n_class=10)
model.depth = 2
outputs = model.generate_decision_tree(batch['input_x'], batch['input_y'], depth=model.depth)
decision_tree_forest.add_tree(DecisionTree(auto_dims=outputs.metatree_dimensions, auto_thresholds=outputs.tentative_splits, input_x=batch['input_x'], input_y=batch['input_y'], depth=model.depth))
print("Decision Tree Features: ", [x.argmax(dim=-1) for x in outputs.metatree_dimensions])
print("Decision Tree Threasholds: ", outputs.tentative_splits)
tree_pred = decision_tree_forest.predict(torch.tensor(test_X, dtype=torch.float32))
accuracy = accuracy_score(test_y, tree_pred.argmax(dim=-1).squeeze(0))
print("MetaTree Test Accuracy: ", accuracy)
We show a complete example of using MetaTree at notebook
If you have any questions related to the code or the paper, feel free to reach out to us at [email protected].
If you find our paper and code useful, please cite us:
@misc{zhuang2024learning,
title={Learning a Decision Tree Algorithm with Transformers},
author={Yufan Zhuang and Liyuan Liu and Chandan Singh and Jingbo Shang and Jianfeng Gao},
year={2024},
eprint={2402.03774},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
5 files, 302.7 MB in total. The weights are 1 file totalling 302.7 MB in safetensors.
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 302.7 MB | 55bf1637016a |
| config.json | Configuration | 872 B | — |
| generation_config.json | Configuration | 133 B | — |
| README.md | Documentation | 3.5 KB | — |
| .gitattributes | Repository | 1.5 KB | — |
Released by Yufan Zhuang through its official repository on Hugging Face. Read the license.
| Precision | Weights in memory |
|---|---|
| As published | 302.7 MB |
| 16-bit | 0.3 GB |
| 8-bit | 0.2 GB |
| 4-bit | 0.1 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
About 0.4 GB at 16-bit and 0.1 GB at 4-bit: the weights (151M parameters) plus a working margin. A long context needs more.
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
Yes. MetaTree is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.
256 tokens, from the maximum position embeddings in its published configuration.
Модель для соревнования DigitalEdu с использованием трансформеров. 9 эпох. Пример вывода: [False, True]
RT-PluRel is a Relational Transformer checkpoint pair for in-context / few-shot entity prediction over multi-table relational databases (no per-task gradient training). Same architecture and file layout as stanford-star/rt-j — drop-in replacement. Architecture: ~85.6M blocks, dmodel 512, 8 heads, dff 2048 · text columns embedded with all-MiniLM-L12-v2 (dtext 384). Each folder contains model.safetensors (weights) and config.json (dims + text-embedding model). The paper/ subdirectory preserves the earlier RT-PluRel release:.pt checkpoints (12 blocks, dmodel 256, dff 1024) pretrained on synthetic relational databases generated by PluRel, plus the continued-pretraining and fine-tuned RelBench…
Mitra classifier is a tabular foundation model that is pre-trained on purely synthetic datasets sampled from a mix of random classifiers. Mitra is based on a 12-layer Transformer of 72 M parameters, pre-trained by incorporating an in-context learning paradigm. To use Mitra classifier, install AutoGluon by running: A minimal example showing how to perform inference using the Mitra classifier: A minimal example showing how to perform fine-tuning using the Mitra classifier: This project is licensed under the Apache-2.0 License. Amazon Science blog: Mitra: Mixed synthetic priors for enhancing tabular foundation models
Mitra-v2 classifier is a tabular foundation model that is pre-trained on purely synthetic datasets sampled from a mix of random classifiers, including the new Hybrid SCM prior. It is the second generation of the Mitra classifier (autogluon/mitra-classifier), pre-trained with a 10x longer context, three times as many features, and an improved optimizer. On the TabArena and TALENT benchmarks it delivers state-of-the-art accuracy at the level of TabFM and EXAONE Tabular, while surpassing TabPFN-3 by a wide margin. The regression model is at autogluon/mitra-regressor-2, and the inference and fine-tuning code with our evaluation results is at autogluon/mitra-finetune. Mitra-v2 is based on a…
Mitra classifier is a tabular foundation model that is pre-trained on purely synthetic datasets sampled from a mix of random classifiers. Mitra is based on a 12-layer Transformer of 72 M parameters, pre-trained by incorporating an in-context learning paradigm. To use Mitra classifier, install AutoGluon by running: A minimal example showing how to perform inference using the Mitra classifier: A minimal example showing how to perform fine-tuning using the Mitra classifier: This project is licensed under the Apache-2.0 License. Amazon Science blog: Mitra: Mixed synthetic priors for enhancing tabular foundation models