Skip to content

Instantly share code, notes, and snippets.

@rain-1
rain-1 / llama-home.md
Last active May 7, 2024 21:04
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.
@rxaviers
rxaviers / gist:7360908
Last active May 7, 2024 21:01
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@maguero
maguero / setting-multiple-git-accounts.md
Last active May 7, 2024 21:00
Setting multiple Github accounts on MacOS

Setting multiple Github accounts on MacOS

There are some cases on which an engineer need to setup more than one GitHub account on the local env, like a personal and profesional accounts. This post goal is to guide on setting 2 accounts, the default one (let's say your personal) and another one (probably a professional) by setting these on the shh config file.

Let's assume you already have your personal account setup and working. Now it's time to setup the addional account:

1 - Create a new ssh key for your 2nd GitHub account

Follow Generating a new SSH key document in order to generate a new SSH key on your local machine for your 2nd account.

[!NOTE]

@abdennour
abdennour / 00-infra.yaml
Last active May 7, 2024 20:58
Jenkins declarative Pipeline in Kubernetes with Parallel and Sequential steps
apiVersion: v1
kind: Pod
spec:
# dnsConfig:
# options:
# - name: ndots
# value: "1"
containers:
- name: dind
image: abdennour/docker:19-dind-bash
@bechynsky
bechynsky / get_group_members_msgraph.ps1
Created July 1, 2021 12:06
Simple demo how to get list of group members using Microsoft Graph for M365
# https://docs.microsoft.com/en-us/graph/powershell/installation
# https://docs.microsoft.com/en-us/graph/powershell/get-started
# https://developer.microsoft.com/en-us/graph/graph-explorer
# https://tech.nicolonsky.ch/exploring-the-new-microsoft-graph-powershell-modules/
Connect-MgGraph -Scopes "User.Read.All", "GroupMember.Read.All", "Group.Read.All", "Directory.Read.All"
$GROUP_NAME = 'Workspace'
$group = Get-MgGroup -Filter "DisplayName eq '$GROUP_NAME'"
@ca0v
ca0v / debounce.ts
Last active May 7, 2024 20:56
Typescript Debounce
// ts 3.6x
function debounce<T extends Function>(cb: T, wait = 20) {
let h = 0;
let callable = (...args: any) => {
clearTimeout(h);
h = setTimeout(() => cb(...args), wait);
};
return <T>(<any>callable);
}
@BenjaminArmstrong
BenjaminArmstrong / VMCXEditor.ps1
Created April 19, 2017 00:18
PowerShell to edit VMCX files
# Editing a virtual machine file
# This PowerShell code takes an unregistered VMCX file
# It change the VM Name, disables Dynamic Memory, and sets the memory to 2GB
# It then saves the changed virtual machine configuration to a new path
# Parameters that will be changed
$VMConfigurationToEdit = "D:\VMs\Virtual Machines\3F99446F-1D9A-4010-8C8B-4E554E845181.vmcx"
$pathToSaveNewConfigTo = "D:\"
$newVMName= "NewVMName"
@bradtraversy
bradtraversy / terminal-commands.md
Last active May 7, 2024 20:55
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@ethanclevenger91
ethanclevenger91 / after.sh
Last active May 7, 2024 20:54
Install PHP SQLSRV database extension on Laravel Homestead (probably works as a Laravel Forge recipe, too). Thanks @richvida
#!/bin/sh
PHP_MSSQL_DRIVERS=Ubuntu18-7.3
PHP_MSSQL_RELEASE=5.6.1
# Download and extract phpmysql drivers
sudo wget "https://github.com/Microsoft/msphpsql/releases/download/v${PHP_MSSQL_RELEASE}/${PHP_MSSQL_DRIVERS}.tar" -O - | tar -x
# Change Directory
cd $PHP_MSSQL_DRIVERS
@shamil
shamil / mount_qcow2.md
Last active May 7, 2024 20:53
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8