Skip to content

Instantly share code, notes, and snippets.

View wx-chevalier's full-sized avatar
🎯
Focusing

王下邀月熊 wx-chevalier

🎯
Focusing
View GitHub Profile
@rain-1
rain-1 / llama-home.md
Last active May 16, 2024 04:58
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.
@lotuc
lotuc / create_namespace_and_serivce_account_for_it.sh
Last active January 4, 2020 07:06
Create a kubernetes namespace & create a service account with full access to this namespace and access to this namespace only & generate the service account's config file for kubectl
#!/usr/bin/env bash
# namespace you want to create
NAMESPACE=<namespace>
# cluster configuration
CLUSTER_SERVER=https://<your-cluster-endpoint>
CLUSTER_NAME=<your-cluster-name>
# customize these names as needed
@cb372
cb372 / riscv.md
Last active May 9, 2024 07:27
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.

@wx-chevalier
wx-chevalier / datebase_demo.sql
Last active November 17, 2018 04:41
Demo Datebase for SQL Learning, Backend Application Example, MySQL Optimization, etc.
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `component`
-- ----------------------------
DROP TABLE IF EXISTS `component`;
CREATE TABLE `component` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(40) DEFAULT NULL,
@ebidel
ebidel / coverage.js
Last active April 27, 2024 04:13
CSS/JS code coverage during lifecycle of page load
Moved to https://github.com/ebidel/puppeteer-examples
@wx-chevalier
wx-chevalier / es-data.sh
Created December 8, 2017 13:44
ElasticSearch Data Generator
curl -XPUT "http://localhost:9200/movies/movie/1" -d'
{
"title": "The Godfather",
"director": "Francis Ford Coppola",
"year": 1972,
"genres": ["Crime", "Drama"]
}'
curl -XPUT "http://localhost:9200/movies/movie/2" -d'
{
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active May 22, 2024 14:36
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.