generated from rochacbruno/python-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(KAN_GPT.ipynb): notebook added for colab training
- Loading branch information
Showing
4 changed files
with
144 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "sDr8C_ddSnYt" | ||
}, | ||
"source": [ | ||
"# KAN-GPT\n", | ||
"\n", | ||
"Making a Generative Pre-trained Transformer using Kolmogorov-Arnold Networks for language modeling\n", | ||
"\n", | ||
"- [minGPT](https://github.com/karpathy/minGPT)\n", | ||
"- [pykan](https://github.com/KindXiaoming/pykan)\n", | ||
"- [WebText](https://github.com/openai/gpt-2-output-dataset)\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"id": "mZQ_DwaYUx04" | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Download Repo\n", | ||
"!git clone https://github.com/AdityaNG/kan-gpt\n", | ||
"%cd kan-gpt\n", | ||
"!git pull\n", | ||
"# Download Dataset\n", | ||
"!./scripts/download_webtext.sh\n", | ||
"# Install dependencies\n", | ||
"!pip install -r requirements.txt\n", | ||
"!pip install -e ." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"colab": { | ||
"base_uri": "https://localhost:8080/" | ||
}, | ||
"id": "I94Fcfs1TjEI", | ||
"outputId": "e930a6f8-5f76-4e7a-b86c-c885fd7a8017" | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"tokenizer_config.json: 100% 26.0/26.0 [00:00<00:00, 101kB/s]\n", | ||
"vocab.json: 100% 1.04M/1.04M [00:00<00:00, 10.6MB/s]\n", | ||
"merges.txt: 100% 456k/456k [00:00<00:00, 17.4MB/s]\n", | ||
"tokenizer.json: 100% 1.36M/1.36M [00:00<00:00, 24.5MB/s]\n", | ||
"config.json: 100% 665/665 [00:00<00:00, 2.46MB/s]\n", | ||
"torch.Size([1023]) torch.Size([1023])\n", | ||
"number of parameters: 124.44M\n", | ||
"running on device cpu\n", | ||
"iter_dt 0.00ms; iter 0: train loss 11.00978\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"!CUDA_VISIBLE_DEVICE=\"0\" python3 -m kan_gpt.train" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"colab": { | ||
"provenance": [] | ||
}, | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"name": "python" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters