Skip to content

Instantly share code, notes, and snippets.

@rain-1
rain-1 / llama-home.md
Last active April 28, 2024 18:42
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.
Disco Flow Notebook
0: ["Botanical Gardens oil on canvas"],
130: ["Yggdrasil oil on canvas by Tobias Roetschvector art oil on canvas by Karla Knight"],
166: ["Yggdrasil oil on canvas by Tobias Roetsch"],
196: ["psychedelic hall of mirrors by johfra bosschart"],
217: ["360 degree photo sphere space architecture robot"],
243: ["psychedelic hall of mirrors by Philip Kirkland"],
272: ["psychedelic hall of mirrors by alex grey"],
298: ["eye oil on canvas by agnes lawrence pelton"],
@dabeaz
dabeaz / README.txt
Created October 15, 2019 20:10
PyCon India 2019, Code from Keynote Presentation by @dabeaz
Code from PyCon India 2019 Keynote Talk
David Beazley (https://www.dabeaz.com)
======================================
This code is presented "as is" and represents what was live-coded
during my closing keynote presentation at PyCon India, Chennai,
October 13, 2009. I have made no changes to the files.
Requires: Python 3.6+, numpy, pygame
@gmolveau
gmolveau / firefox_dark_background.md
Last active April 30, 2024 21:38
Firefox dark background / theme for new tab and loading screen

Firefox Dark Background

  • How to change the background on Firefox to a dark one on new tab / loading screen ?

Procedure

  • Type about:config in the URL bar
  • Search toolkit.legacyUserProfileCustomizations.stylesheets and double-click the field to set it to true
  • Type about:support in the URL bar
  • Look for Profile folder field and click on the open button next to it.
@Circl3s
Circl3s / i3-popout.config
Created October 22, 2018 15:14
Pop-out player (or picture-in-picture, whatevs) for i3. Just slap in in the config and watch it do the magic. (For now works only on 1920x1080 xd)
# Pop-out player:
# Press mod+PageUp to pop out the current window: float it, resize it, stick it.
# Press mod+Shift+PageUp to enter edit mode.
bindsym $mod+Prior fullscreen disable, floating enable, resize set 576 324, sticky enable, move window to position 1322 735
bindsym $mod+Shift+Prior mode "$mode_popout"
set $mode_popout Pop-out player: (k) lower left, (l) lower right, (i) upper left, (o) upper right
mode "$mode_popout" {
# Change position
@kfatehi
kfatehi / _list-github-pull-requests.md
Last active April 29, 2024 00:26
list pull requests across entire organization
@ssokolow
ssokolow / x11_watch_active_window.py
Last active February 6, 2024 22:50
python-xlib example which reacts to changing the active window
#!/usr/bin/env python
"""python-xlib example which reacts to changing the active window/title.
Requires:
- Python
- python-xlib
Tested with Python 2.x because my Kubuntu 14.04 doesn't come with python-xlib
for Python 3.x.
@ephemient
ephemient / ⁄etc⁄pacman.d⁄hooks⁄linux-modules-post.hook
Last active April 4, 2024 21:49
(Arch Linux) Keep current modules around during kernel upgrade
[Trigger]
Operation = Upgrade
Type = Package
Target = linux
[Action]
Description = Restore Linux kernel modules
When = PostTransaction
Depends = coreutils
Depends = rsync
@arobb
arobb / sierra-virtualbox-install.md
Last active November 24, 2020 13:15
Install macOS Sierra in VirtualBox on macOS host

Step 1 (Creating a bootable macOS Sierra ISO for VirtualBox):

  1. hdiutil attach /Applications/Install\ macOS\ Sierra\ Public\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
  2. hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
  3. hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
  4. asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
  5. rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
  6. cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
  7. cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist
@parmentf
parmentf / GitCommitEmoji.md
Last active May 6, 2024 18:30
Git Commit message Emoji