MachineLearningLM/MachineLearningLM-7B-v1
MachineLearningLM
This repository contains the model presented in the paper MachineLearningLM: Scaling Many-shot In-context Learning via Continued Pretraining.
Model Summary
Can LLMs learn from 1,000 in-context examples?
Introducing MachineLearningLM π§ͺπ β a model continuously pretrained on millions of synthetic tabular ML tasks, enabling robust many-shot in-context learning.
π Scales from 8 to 1,024 examples
π ββ~15% improvementββ on unseen tabular tasks compared to o3-mini / GPT-5-mini / Qwen-2.5-7B-Instruct
π² ββRandom-Forestβlevel numerical modeling robustnessββ
π§ ββMMLU score: 75.4%ββ
π Read the paper: https://huggingface.co/papers/2509.06806
GitHub: https://github.com/HaoAreYuDong/MachineLearningLM
Evaluation and Validation
We have developed an automated evaluation framework β simply configure the parameters to easily perform validation and evaluation. The code is now open-sourced at our [GitHub repository](https://github.com/HaoAreYuDong/MachineLearningLM).
Quick Start
pip install -r requirements.txt
python ./src/evaluation/model_pred/dl_model_pred.py \
--input_dir ./demo_input.jsonl \
--output_dir ./demo_output.jsonl \
--model_name MachineLearningLM/MachineLearningLM-7B-v1Pipeline
# modify the evaluate_parameters.sh file
source evaluate_parameters.sh
# Option 1 End-to-End Pipeline
./scripts/evaluate_pipeline.sh
# Option 2 Parallel Processing
./scripts/multi_process/data_prep.sh
./scripts/multi_process/prompt_gen.sh # For deep learning only
./scripts/multi_process/model_pred.sh
./scripts/multi_process/evaluation.sh
./scripts/multi_process/report.sh
# Option3 Sequential Processing
./scripts/single_process/data_prep.sh
./scripts/single_process/prompt_gen.sh # For deep learning only
./scripts/single_process/model_pred.sh
./scripts/single_process/evaluation.sh
./scripts/single_process/report.shFor more usage details, please visit our GitHub.
Quants of Checkpoints
https://huggingface.co/QuantFactory/MachineLearningLM-7B-v1-GGUF
Tabicl Evaluation
This part of the code needs to run in an environment with the tabicl and openpyxl libraries installed.
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.
Use --datasets to specify the datasets to be evaluated, and --sample_sizes to indicate the number of shots.
If multiple datasets need to be evaluated, separate them with spaces. To evaluate all CSV files in the input folder, use all.
Prior_data
MachineLearningLM uses the code from tabicl to generate prior data.
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.
Parameter IntroductionοΌrefer to the comments in the file tabicl\src\tabicl\prior\dataset.pyοΌ
Data Scale & Structure
Batch Configuration
Sequence Length Control
Train-Test Split
Generation Method
Computation Settings
Train
MachineLearningLM uses the LLaMA-Factory framework for training.
Training Environment Configuration
cd ./third_party/LLaMA-Factory
pip install -e ".[torch,metrics]" --no-build-isolation
pip install wandbUse ./scripts/train.sh for training.
Project Structure
MachineLearningLM/
βββsrc/
| βββevaluation/
β β βββ data_prep/ # Data preprocessing and chunking utilities
β β βββ prompt_gen/ # Prompt generation for deep learning models
β β βββ model_pred/ # Model inference (ML and DL prediction engines)
β β βββ result_proc/ # 5-layer evaluation architecture and metrics processing
β β βββ zero_summary/ # Result summarization and report generation
β β βββ tabicl_evaluate.py
β βββprior_data
β βββ pt_to_csv.py
βββ scripts/
β βββ single_process/ # Sequential execution shell scripts
β βββ multi_process/ # Parallel execution shell scripts (with _mp suffix)
β βββ evaluate_parameters.sh # Global parameter configuration
| βββ evaluate_pipeline.sh # automated pipeline
| βββ generate_data.sh
| βββ tabicl_evaluate.sh
| βββ train.sh
βββ datahub_inputs/
β βββ data_demo/ # Demo datasets for testing
β βββ data_raw/ # Raw input datasets
βββ third_party/
β βββ tabicl/
β βββ LLaMA-Factory/
βββ requirements.txt # Python dependencies for Evaluation Framework
βββ README.md
βββ README_zh.md
βββ THIRD_PARTY_NOTICES.md
βββ LICENSE