SOTA Sports-domain Language Model under Billion Parameters
8
stars
218
commits
Python
primary language
Aug 26, 2026
updated
OnlySportsLM is a comprehensive project aimed at creating and evaluating a domain-specific language model for sports-related content. This repository contains the code and resources for the entire OnlySports collection, including dataset creation, model training, and evaluation.
The OnlySports dataset and model checkpoint can be found in our Huggingface.
The OnlySports collection consists of:
This repository provides tools and scripts to recreate our work or use our code for your own projects.
huggingface_hubtransformersdatasetstorch (version 2.3.1+cu121 recommended)pandasnumpypytorch-lightning==1.9.5deepspeedwandbClone this repository:
git clone https://github.com/chrischenhub/OnlySportsLM.git
cd OnlySportsLM
Install the required Python packages:
pip install -r requirements.txt
For model training, install additional dependencies:
pip install torch --upgrade --extra-index-url https://download.pytorch.org/whl/cu121
pip install pytorch-lightning==1.9.5 deepspeed wandb ninja --upgrade
Download the target dataset to your local directory, preferably in parquet format.
Run the sports URL filter:
python sports_URL_filter.py -t 4 -j patterns.json
-t, --threads: Number of threads to use (Default: 3)-j, --json: Path to JSON file containing folder name with parquet files-n, --name: Folder name with parquet files (if --json not provided)Run the sports classifier:
python sports_classifier.py -n CC-MAIN-2013-20
Each element in patterns is a folder name that contain parquet files
{
"patterns": [
"CC-MAIN-2013-20",
"CC-MAIN-2013-40"
...
]
}
Convert parquet to json
cargo install parquet2json
parquet2json ./myfile.parquet cat > output.jsonl
Convert json to bin
cargo install json2bin@0.2.0
json2bin -i src/sample.jsonl
Navigate to the training directory:
cd model_training/
Prepare the training environment:
./demo-training-prepare.sh
Start the training process:
./demo-training-run.sh
Note: You may want to log in to Weights & Biases (wandb) first for experiment tracking.
The current --my_exit_tokens number and --magic_prime prime is set for training using OnlySports Dataset. Adjust these parameters if using another dataset.
Refer to RWKV repo for detail training setup.
eval_question.jsonl containing 1000 generated sports prompts.api_eval.ipynb.Feel free to add more LLMs judges to the notebook for comparison.
Here's a snapshot of OnlySportsLM's performance:
If you use OnlySports Collection in your research, please cite our paper.
This project is licensed under the CC BY-NC-SA 4.0.
Python
82.6%
Cuda
8.8%
Jupyter Notebook
5.2%
C++
1.7%
Shell
1.6%
SOTA Sports-domain Language Model under Billion Parameters
8
stars
218
commits
Python
primary language
Aug 26, 2026
updated
OnlySportsLM is a comprehensive project aimed at creating and evaluating a domain-specific language model for sports-related content. This repository contains the code and resources for the entire OnlySports collection, including dataset creation, model training, and evaluation.
The OnlySports dataset and model checkpoint can be found in our Huggingface.
The OnlySports collection consists of:
This repository provides tools and scripts to recreate our work or use our code for your own projects.
huggingface_hubtransformersdatasetstorch (version 2.3.1+cu121 recommended)pandasnumpypytorch-lightning==1.9.5deepspeedwandbClone this repository:
git clone https://github.com/chrischenhub/OnlySportsLM.git
cd OnlySportsLM
Install the required Python packages:
pip install -r requirements.txt
For model training, install additional dependencies:
pip install torch --upgrade --extra-index-url https://download.pytorch.org/whl/cu121
pip install pytorch-lightning==1.9.5 deepspeed wandb ninja --upgrade
Download the target dataset to your local directory, preferably in parquet format.
Run the sports URL filter:
python sports_URL_filter.py -t 4 -j patterns.json
-t, --threads: Number of threads to use (Default: 3)-j, --json: Path to JSON file containing folder name with parquet files-n, --name: Folder name with parquet files (if --json not provided)Run the sports classifier:
python sports_classifier.py -n CC-MAIN-2013-20
Each element in patterns is a folder name that contain parquet files
{
"patterns": [
"CC-MAIN-2013-20",
"CC-MAIN-2013-40"
...
]
}
Convert parquet to json
cargo install parquet2json
parquet2json ./myfile.parquet cat > output.jsonl
Convert json to bin
cargo install json2bin@0.2.0
json2bin -i src/sample.jsonl
Navigate to the training directory:
cd model_training/
Prepare the training environment:
./demo-training-prepare.sh
Start the training process:
./demo-training-run.sh
Note: You may want to log in to Weights & Biases (wandb) first for experiment tracking.
The current --my_exit_tokens number and --magic_prime prime is set for training using OnlySports Dataset. Adjust these parameters if using another dataset.
Refer to RWKV repo for detail training setup.
eval_question.jsonl containing 1000 generated sports prompts.api_eval.ipynb.Feel free to add more LLMs judges to the notebook for comparison.
Here's a snapshot of OnlySportsLM's performance:
If you use OnlySports Collection in your research, please cite our paper.
This project is licensed under the CC BY-NC-SA 4.0.
Python
82.6%
Cuda
8.8%
Jupyter Notebook
5.2%
C++
1.7%
Shell
1.6%