Skip to content

Instantly share code, notes, and snippets.

View Omie's full-sized avatar

Omkarnath Omie

View GitHub Profile
@Omie
Omie / llama-home.md
Created May 15, 2023 06:49 — forked from rain-1/llama-home.md
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
import json
import requests
import argparse
from http.server import HTTPServer, BaseHTTPRequestHandler
class S(BaseHTTPRequestHandler):
def _set_headers(self):
self.send_response(200)
@Omie
Omie / README.md
Created December 15, 2021 10:25 — forked from maelvls/README.md
Linux: things I did while configuring my linux box
#!/bin/bash
echo "Magic!" echo -en "\033[1F\033[2K" echo "Moar Magic!"
#This script will print "Magic!" then the next echo sends escape sequences that move the cursor up 1 line with '\033[1F', then '\033[2K' clears the line the cursor is on, which is now the "Magic!" line. Then we output "Moar Magic". 3 commands but only one line of output.
#The -e option on echo enables the escape sequences instead of literal chars. -n disables echos automatic newline for the sequence that deletes the first line
# https://news.ycombinator.com/item?id=18915489
$ sqlite3
sqlite3> .mode csv
sqlite3> .import filename.csv data # data is our virtual table name
sqlite3> select * from data;

Keybase proof

I hereby claim:

  • I am omie on github.
  • I am omkarnath (https://keybase.io/omkarnath) on keybase.
  • I have a public key ASDxqTXKgXv7N8POZjh6NzsY_nCDi93QYfQN_vBHYCfnDQo

To claim this, I am signing this object:

// https://www.reddit.com/r/golang/comments/16b2mv/go_code_is_beautiful_and_makes_my_job_writing/
// http://play.golang.org/p/wRdDJ8meEO
package main
import (
"encoding/json"
"log"
"os"
)
@Omie
Omie / install.sh
Last active August 29, 2015 14:25 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
package main
import (
"log"
"time"
)
var foo chan int
func fillFoo() {
https://linuxcontainers.org/
https://help.ubuntu.com/lts/serverguide/lxc.html
http://www.janoszen.com/2013/05/14/lxc-tutorial/
Installing LXC ( ubuntu 13.04 )
$ sudo apt-get install lxc lxctl lxc-templates
Creating container