Operation system: Ubuntu 16.04.6 LTS
QEMU emulator version: 2.5.0
| # Copyright (c) 2023, Taihsiang Ho <tai271828@solvcon.net> | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # | |
| # - Redistributions of source code must retain the above copyright notice, this | |
| # list of conditions and the following disclaimer. | |
| # - Redistributions in binary form must reproduce the above copyright notice, | |
| # this list of conditions and the following disclaimer in the documentation | |
| # and/or other materials provided with the distribution. |
| #!/bin/bash | |
| # Author: Hsieh-Ting Lin | |
| # Title: "rename" | |
| # Date: "2024-02-05" | |
| # Version: 1.0.0 | |
| # desc: rename by ChatGPT | |
| API_ENDPOINT="https://api.openai.com/v1/chat/completions" | |
| pdf_folder="." |
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |