Improve model card: Add pipeline tag, library name, and expand usage details

#2
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +124 -6
README.md CHANGED
@@ -1,13 +1,16 @@
1
  ---
2
- MachineLearningML: Continued Pretraining Language Models on Millions of Synthetic Tabular Prediction Tasks Scales In-Context ML
3
- license: apache-2.0
4
  base_model:
5
  - Qwen/Qwen2.5-7B-Instruct
 
 
 
6
  ---
7
 
8
  # MachineLearningLM
9
 
10
- ## model summary
 
 
11
 
12
  Can LLMs learn from 1,000 in-context examples?
13
 
@@ -25,10 +28,10 @@ Introducing **MachineLearningLM** πŸ§ͺπŸ“Š β€” a model continuously pretrained o
25
 
26
  GitHub: https://github.com/HaoAreYuDong/MachineLearningLM
27
 
28
- ## evaluation and validation
29
 
30
  We have developed an automated evaluation framework β€” simply configure the parameters to easily perform validation and evaluation.
31
- **The code is now open-sourced at our GitHub.**
32
 
33
  **Quick Start**
34
 
@@ -39,7 +42,7 @@ python ./src/evaluation/model_pred/dl_model_pred.py \
39
  --output_dir ./demo_output.jsonl \
40
  --model_name MachineLearningLM/MachineLearningLM-7B-v1
41
  ```
42
- **pipeline**
43
  ```bash
44
  # modify the evaluate_parameters.sh file
45
  source evaluate_parameters.sh
@@ -64,3 +67,118 @@ source evaluate_parameters.sh
64
 
65
  For more usage details, please visit our GitHub.
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
 
2
  base_model:
3
  - Qwen/Qwen2.5-7B-Instruct
4
+ license: apache-2.0
5
+ pipeline_tag: text-generation
6
+ library_name: transformers
7
  ---
8
 
9
  # MachineLearningLM
10
 
11
+ This repository contains the model presented in the paper [MachineLearningLM: Scaling Many-shot In-context Learning via Continued Pretraining](https://huggingface.co/papers/2509.06806).
12
+
13
+ ## Model Summary
14
 
15
  Can LLMs learn from 1,000 in-context examples?
16
 
 
28
 
29
  GitHub: https://github.com/HaoAreYuDong/MachineLearningLM
30
 
31
+ ## Evaluation and Validation
32
 
33
  We have developed an automated evaluation framework β€” simply configure the parameters to easily perform validation and evaluation.
34
+ **The code is now open-sourced at our [GitHub repository](https://github.com/HaoAreYuDong/MachineLearningLM).**
35
 
36
  **Quick Start**
37
 
 
42
  --output_dir ./demo_output.jsonl \
43
  --model_name MachineLearningLM/MachineLearningLM-7B-v1
44
  ```
45
+ **Pipeline**
46
  ```bash
47
  # modify the evaluate_parameters.sh file
48
  source evaluate_parameters.sh
 
67
 
68
  For more usage details, please visit our GitHub.
69
 
70
+ ## Tabicl Evaluation
71
+
72
+ **This part of the code needs to run in an environment with the tabicl and openpyxl libraries installed.**
73
+
74
+ The evaluation code for tabicl is placed separately in the `./src/evaluation/tabicl_evaluate.py` file. Use `./scripts/tabicl_evaluate.sh` to obtain the evaluation results for tabicl.
75
+
76
+ Use --datasets to specify the datasets to be evaluated, and --sample_sizes to indicate the number of shots.
77
+
78
+ If multiple datasets need to be evaluated, separate them with spaces. To evaluate all CSV files in the input folder, use **all**.
79
+
80
+ ## Prior_data
81
+
82
+ MachineLearningLM uses the code from tabicl to generate prior data.
83
+
84
+ Use `./scripts/generate_data.sh` to generate the prior data. It generates the corresponding .pt and .csv files, and normalizes the feature values in the CSV files to the range of 0–999, as we did in the paper.
85
+
86
+ ### Parameter Introduction(refer to the comments in the file `tabicl\src\tabicl\prior\dataset.py`οΌ‰
87
+
88
+ **Data Scale & Structure**
89
+
90
+ | Parameter | Type | Description |
91
+ | :------------- | :--- | :------------------------------------------------------ |
92
+ | `min_features` | int | Minimum number of features per dataset |
93
+ | `max_features` | int | Maximum number of features per dataset |
94
+ | `max_classes` | int | Maximum number of target classes |
95
+ | `min_seq_len` | int | Minimum samples per dataset. Uses `max_seq_len` if None |
96
+ | `max_seq_len` | int | Maximum samples per dataset (Not IncludeοΌ‰ |
97
+
98
+ **Batch Configuration**
99
+
100
+ | Parameter | Type | Description |
101
+ | :--------------------- | :--- | :----------------------------------------------------------- |
102
+ | `batch_size` | int | Total number of datasets to generate per batch |
103
+ | `batch_size_per_gp` | int | Number of datasets per group (shared characteristics) |
104
+ | `batch_size_per_subgp` | int | Number of datasets per subgroup (similar causal structures). Defaults to `batch_size_per_gp` if None |
105
+
106
+ **Sequence Length Control**
107
+
108
+ | Parameter | Type | Description |
109
+ | :--------------- | :--- | :----------------------------------------------------------- |
110
+ | `log_seq_len` | bool | Sample sequence length from log-uniform distribution if True |
111
+ | `seq_len_per_gp` | bool | Sample sequence length per group (enables variable-sized datasets) |
112
+ | `replay_small` | bool | Occasionally sample smaller sequences for model robustness |
113
+
114
+ **Train-Test Split**
115
+
116
+ | Parameter | Type | Description |
117
+ | :--------------- | :-------- | :----------------------------------------------------------- |
118
+ | `min_train_size` | int/float | Start position/ratio for train split (int: absolute, float: fractional) |
119
+ | `max_train_size` | int/float | End position/ratio for train split (int: absolute, float: fractional) |
120
+
121
+ **Generation Method**
122
+
123
+ | Parameter | Type | Description |
124
+ | :----------- | :--- | :----------------------------------------------------------- |
125
+ | `prior_type` | str | Prior type: 'mlp_scm', 'tree_scm', or 'mix_scm' (random selection) |
126
+ | `fixed_hp` | dict | Fixed structural configuration parameters |
127
+ | `sampled_hp` | dict | Parameters sampled during generation |
128
+
129
+ **Computation Settings**
130
+
131
+ | Parameter | Type | Description |
132
+ | :------------------------- | :--- | :------------------------------------------------ |
133
+ | `n_jobs` | int | Number of parallel jobs (-1 = use all processors) |
134
+ | `num_threads_per_generate` | int | Number of threads per generation job |
135
+ | `device` | str | Computation device ('cpu' or 'cuda') |
136
+
137
+ ## Train
138
+
139
+ MachineLearningLM uses the LLaMA-Factory framework for training.
140
+
141
+ #### Training Environment Configuration
142
+
143
+ ```bash
144
+ cd ./third_party/LLaMA-Factory
145
+ pip install -e ".[torch,metrics]" --no-build-isolation
146
+ pip install wandb
147
+ ```
148
+
149
+ Use `./scripts/train.sh` for training.
150
+
151
+ ## Project Structure
152
+
153
+ ```
154
+ MachineLearningLM/
155
+ β”œβ”€β”€src/
156
+ | β”œβ”€β”€evaluation/
157
+ β”‚ β”‚ β”œβ”€β”€ data_prep/ # Data preprocessing and chunking utilities
158
+ β”‚ β”‚ β”œβ”€β”€ prompt_gen/ # Prompt generation for deep learning models
159
+ β”‚ β”‚ β”œβ”€β”€ model_pred/ # Model inference (ML and DL prediction engines)
160
+ β”‚ β”‚ β”œβ”€β”€ result_proc/ # 5-layer evaluation architecture and metrics processing
161
+ β”‚ β”‚ β”œβ”€β”€ zero_summary/ # Result summarization and report generation
162
+ β”‚ β”‚ └── tabicl_evaluate.py
163
+ β”‚ └──prior_data
164
+ β”‚ └── pt_to_csv.py
165
+ β”œβ”€β”€ scripts/
166
+ β”‚ β”œβ”€β”€ single_process/ # Sequential execution shell scripts
167
+ β”‚ β”œβ”€β”€ multi_process/ # Parallel execution shell scripts (with _mp suffix)
168
+ β”‚ β”œβ”€β”€ evaluate_parameters.sh # Global parameter configuration
169
+ | β”œβ”€β”€ evaluate_pipeline.sh # automated pipeline
170
+ | β”œβ”€β”€ generate_data.sh
171
+ | β”œβ”€β”€ tabicl_evaluate.sh
172
+ | └── train.sh
173
+ β”œβ”€β”€ datahub_inputs/
174
+ β”‚ β”œβ”€β”€ data_demo/ # Demo datasets for testing
175
+ β”‚ └── data_raw/ # Raw input datasets
176
+ β”œβ”€β”€ third_party/
177
+ β”‚ β”œβ”€β”€ tabicl/
178
+ β”‚ └── LLaMA-Factory/
179
+ β”œβ”€β”€ requirements.txt # Python dependencies for Evaluation Framework
180
+ β”œβ”€β”€ README.md
181
+ β”œβ”€β”€ README_zh.md
182
+ β”œβ”€β”€ THIRD_PARTY_NOTICES.md
183
+ └── LICENSE
184
+ ```