nielsr HF Staff commited on
Commit
0a2b9d0
·
verified ·
1 Parent(s): a9513f1

Improve model card: Add pipeline tag, library_name, abstract, and usage

Browse files

This PR significantly improves the model card for **RouteFinder** by:

- Adding the `pipeline_tag: reinforcement-learning`, which makes the model discoverable on the Hub via https://huggingface.co/models?pipeline_tag=reinforcement-learning.
- Including `library_name: rl4co` as the model uses techniques related to Reinforcement Learning for Combinatorial Optimization and explicitly references `rl4co` in its documentation and acknowledgements.
- Updating the main title to reflect the paper's full title: [RouteFinder: Towards Foundation Models for Vehicle Routing Problems](https://huggingface.co/papers/2406.15007).
- Adding the paper's abstract to provide a clear overview of the model.
- Incorporating detailed "Installation" and "Quickstart" sections with code snippets directly from the official GitHub repository, facilitating easier model usage.
- Adding the official citation information.

These changes provide a more comprehensive and user-friendly model card.

Files changed (1) hide show
  1. README.md +86 -2
README.md CHANGED
@@ -1,7 +1,91 @@
1
  ---
2
  license: mit
 
 
3
  ---
4
 
5
- # RouteFinder Checkpoints
6
 
7
- You may find instructions here: https://github.com/ai4co/routefinder
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ pipeline_tag: reinforcement-learning
4
+ library_name: rl4co
5
  ---
6
 
7
+ # RouteFinder: Towards Foundation Models for Vehicle Routing Problems
8
 
9
+ This repository contains the checkpoints for **RouteFinder**, a comprehensive foundation model framework designed to tackle various Vehicle Routing Problem (VRP) variants. This model was presented in the paper [RouteFinder: Towards Foundation Models for Vehicle Routing Problems](https://huggingface.co/papers/2406.15007).
10
+
11
+ The official code and detailed instructions are available in the [GitHub repository](https://github.com/ai4co/routefinder).
12
+
13
+ ## Abstract
14
+
15
+ This paper introduces RouteFinder, a comprehensive foundation model framework to tackle different Vehicle Routing Problem (VRP) variants. Our core idea is that a foundation model for VRPs should be able to represent variants by treating each as a subset of a generalized problem equipped with different attributes. We propose a unified VRP environment capable of efficiently handling any combination of these attributes. The RouteFinder model leverages a modern transformer-based encoder and global attribute embeddings to improve task representation. Additionally, we introduce two reinforcement learning techniques to enhance multi-task performance: mixed batch training, which enables training on different variants at once, and multi-variant reward normalization to balance different reward scales. Finally, we propose efficient adapter layers that enable fine-tuning for new variants with unseen attributes. Extensive experiments on 48 VRP variants show RouteFinder outperforms recent state-of-the-art learning methods. Our code is publicly available at this https URL .
16
+
17
+ ## Installation
18
+
19
+ We use [uv](https://github.com/astral-sh/uv) (Python package manager) to manage the dependencies:
20
+
21
+ ```bash
22
+ uv venv --python 3.12 # create a new virtual environment
23
+ source .venv/bin/activate # activate the virtual environment
24
+ uv sync --all-extras # for all dependencies
25
+ ```
26
+
27
+ Note that this project is also compatible with normal `pip install -e .` in case you use a different package manager.
28
+
29
+ ## Quickstart
30
+
31
+ ### Download data and checkpoints
32
+
33
+ To download the data and checkpoints from HuggingFace automatically, you can use:
34
+
35
+ ```bash
36
+ python scripts/download_hf.py
37
+ ```
38
+
39
+ ### Running
40
+
41
+ We recommend exploring [this quickstart notebook](https://github.com/ai4co/routefinder/blob/main/examples/1.quickstart.ipynb) to get started with the `RouteFinder` codebase!
42
+
43
+ The main runner (example here of main baseline) can be called via:
44
+
45
+ ```bash
46
+ python run.py experiment=main/rf/rf-transformer-100
47
+ ```
48
+ You may change the experiment by using the `experiment=YOUR_EXP`, with the path under [`configs/experiment`](https://github.com/ai4co/routefinder/tree/main/configs/experiment) directory.
49
+
50
+ ### Testing
51
+
52
+ You may use the provided test function to test the model:
53
+
54
+ ```bash
55
+ python test.py --checkpoint checkpoints/100/rf-transformer.ckpt
56
+ ```
57
+
58
+ or with additional parameters:
59
+
60
+ ```
61
+ usage: test.py [-h] --checkpoint CHECKPOINT [--problem PROBLEM] [--size SIZE] [--datasets DATASETS] [--batch_size BATCH_SIZE]
62
+ [--device DEVICE] [--remove-mixed-backhaul | --no-remove-mixed-backhaul]
63
+
64
+ options:
65
+ -h, --help show this help message and exit
66
+ --checkpoint CHECKPOINT
67
+ Path to the model checkpoint
68
+ --problem PROBLEM Problem name: cvrp, vrptw, etc. or all
69
+ --size SIZE Problem size: 50, 100, for automatic loading
70
+ --datasets DATASETS Filename of the dataset(s) to evaluate. Defaults to all under data/{problem}/ dir
71
+ --batch_size BATCH_SIZE
72
+ --device DEVICE
73
+ --remove-mixed-backhaul, --no-remove-mixed-backhaul
74
+ Remove mixed backhaul instances. Use --no-remove-mixed-backhaul to keep them. (default: True)
75
+ ```
76
+
77
+ ## Citation
78
+
79
+ If you find RouteFinder valuable for your research or applied projects:
80
+
81
+ ```bibtex
82
+ @article{
83
+ berto2025routefinder,
84
+ title={{RouteFinder: Towards Foundation Models for Vehicle Routing Problems}},
85
+ author={Federico Berto and Chuanbo Hua and Nayeli Gast Zepeda and Andr{\'e} Hottung and Niels Wouda and Leon Lan and Junyoung Park and Kevin Tierney and Jinkyoo Park},
86
+ journal={Transactions on Machine Learning Research},
87
+ issn={2835-8856},
88
+ year={2025},
89
+ url={https://openreview.net/forum?id=QzGLoaOPiY},
90
+ }
91
+ ```