Skip to content

Instantly share code, notes, and snippets.

View jyap808's full-sized avatar

Julian Y jyap808

View GitHub Profile
@rain-1
rain-1 / llama-home.md
Last active February 22, 2024 05:52
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.
@zer0TF
zer0TF / convert_to_safe.py
Created November 28, 2022 04:53
Convert all CKPT files to SAFETENSOR files in a directory
# Got a bunch of .ckpt files to convert?
# Here's a handy script to take care of all that for you!
# Original .ckpt files are not touched!
# Make sure you have enough disk space! You are going to DOUBLE the size of your models folder!
#
# First, run:
# pip install torch torchsde==0.2.5 safetensors==0.2.5
#
# Place this file in the **SAME DIRECTORY** as all of your .ckpt files, open a command prompt for that folder, and run:
# python convert_to_safe.py
/**
* Render CyberBrokers
* Using the on-chain Broker renderer
**/
// Change these variables as you see fit
const WEB3_PROVIDER_URL = "http://0.0.0.0:8545";
const TOKEN_ID = 0;
const SVG_SAVE_FILE_NAME = `${__dirname}/CyberBroker_${TOKEN_ID}.svg`;
@yorickdowne
yorickdowne / SepoliaWhale.md
Last active March 18, 2024 09:02
Get that sweet Sepolia ETH

Sepolia is now on PoS

As of 2022/7/6, Sepolia has switched to PoS. The window to do some mining has closed.

Testnets after merge (original, old content from here)

It's mid 2022, Ethereum is still PoW and motoring towards merge / PoS. Surviving testnets will be Sepolia - currently PoW - and Goerli. Ropsten will be merged and then deprecated, Rinkeby and Kovan won't be merged.

I want to "get ready" for some Sepolia testing pre- and post-merge. Sepolia will not have a public validator set; testing post-merge will be limited to running applications on it. As Sepolia is PoW, I can actually go mine myself some SepplETH. Here's how.

Handshake Airdrop

The airdrop is based on the paper An airdrop that preserves recipient privacy.

To claim the airdrop, you needed to have at least 15 followers on Github as of ~2 years ago and an ssh or gpg key linked to your Github account. You will need to download hsd to create an address and have access to the key linked to your Github account.

It is an easy process with 3 terminals. If you prefer to use a GUI, see Bob.

127.0.0.1 us.rdx2.lgtvsdp.com
127.0.0.1 us.info.lgsmartad.com
127.0.0.1 us.ibs.lgappstv.com
127.0.0.1 us.lgtvsdp.com
127.0.0.1 ad.lgappstv.com
127.0.0.1 smartshare.lgtvsdp.com
127.0.0.1 ibis.lgappstv.com
# added after fork
# from https://www.reddit.com/r/pihole/comments/6qmpv6/blacklists_for_lg_webos_tvs/ and others
package main
import (
"fmt"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
)
@salanfe
salanfe / AdditionContract.sol
Last active July 9, 2022 22:07
Ethereum: python for sending raw JSON-RPC HTTP requests to deploy and interact with a smart contract
pragma solidity ^0.4.18;
contract AdditionContract {
uint public state = 0;
function add(uint value1, uint value2) public {
state = value1 + value2;
}
function getState() public constant returns (uint) {
@sigboe
sigboe / suspend-modules
Last active April 16, 2024 03:57 — forked from mauron85/suspend-modules
Systemd unload modules on sleep
#!/bin/bash
# Put into /lib/systemd/system-sleep/suspend-modules
# chmod a+x /lib/systemd/system-sleep/suspend-modules
# Unloads kernel modules defined in /etc/suspend-modules.d/*.conf
# and /etc/suspend-modules
# with one module per line
# Too see credits, see git history
@miguelmota
miguelmota / sha3.go
Last active September 24, 2022 02:26
Ethereum Sha3 (Keccak256) in Golang
package main
import (
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/crypto/sha3"
)
func main() {
hash := sha3.NewKeccak256()