Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| # Reference: https://svds.com/jupyter-notebook-best-practices-for-data-science/ | |
| import os | |
| from subprocess import check_call | |
| def post_save(model, os_path, contents_manager): | |
| """post-save hook for converting notebooks to .py scripts""" | |
| if model['type'] != 'notebook': | |
| return # only do this for notebooks | |
| d, fname = os.path.split(os_path) | |
| check_call(['jupyter', 'nbconvert', '--to', 'script', fname], cwd=d) |
The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.
There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.

