Skip to content

Instantly share code, notes, and snippets.

View niccai's full-sized avatar

Nick Cairns niccai

View GitHub Profile
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active April 22, 2024 08:47
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@dabit3
dabit3 / SingleTableAppSync.md
Last active February 24, 2023 20:05
GraphQL Single Table Design with DynamoDB and AWS AppSync

GraphQL

GraphQL Schema

type Customer {
  id: ID!
  email: String!
}
@joemccann
joemccann / create_images_json_object_from_dir.js
Created January 14, 2011 21:17
Scan a directory and create a JSON object of images (and write it to a file) of all the images in that directory.
var sys = require("sys"),
fs = require("fs");
function processImageDir(path, outFilename, cb) {
fs.readdir(path, function(err, files) {
var imgfiles = [];
// Check for images and push on the array if it's a match.
files.forEach(function(name) {