Skip to content

Instantly share code, notes, and snippets.

View dangbert's full-sized avatar
✌️

Daniel Engbert dangbert

✌️
View GitHub Profile
@cedrickchee
cedrickchee / llama-7b-m1.md
Last active October 22, 2025 20:38
4 Steps in Running LLaMA-7B on a M1 MacBook with `llama.cpp`

4 Steps in Running LLaMA-7B on a M1 MacBook

The large language models usability

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.

Running LLaMA

There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.

#!/bin/sh
# Do not write .DS_Store to Network Shares
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
# Must kill Finder.app to take effect
#killall Finder
@econchick
econchick / gist:4666413
Last active December 22, 2023 13:32
Python implementation of Dijkstra's Algorithm
class Graph:
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
def add_node(self, value):
self.nodes.add(value)
def add_edge(self, from_node, to_node, distance):