Skip to content

Instantly share code, notes, and snippets.

View davidtorcivia's full-sized avatar
🏴‍☠️

David Torcivia davidtorcivia

🏴‍☠️
View GitHub Profile
# Machine Intelligence Made to Impersonate Characteristics: MIMIC
# NOTE run this $ conda install -c conda-forge mpi4py mpich to get mpi working
# accelerate launch --use_deepspeed -m axolotl.cli.train ./config_name_here
base_model: alpindale/Mistral-7B-v0.2-hf
base_model_config: alpindale/Mistral-7B-v0.2-hf
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
is_mistral_derived_model: true
@ChrisHayduk
ChrisHayduk / merge_qlora_with_quantized_model.py
Last active April 10, 2024 00:36
Merging QLoRA weights with quantized model
"""
The code below combines approaches published by both @eugene-yh and @jinyongyoo on Github.
Thanks for the contributions guys!
"""
import torch
import peft
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("--base_model_name_or_path", type=str)
@adriaandotcom
adriaandotcom / 30-anonymize.conf
Last active May 28, 2020 20:38
Anonymize your syslog logs
# Specify a custom format to anonymize your logs
$template anonymize,"%$year%-%$month%-%$day% %timegenerated:12:19:date-rfc3339% %app-name% %$!new%\n"
# This makes the anonymize template the default for all file actions
$ActionFileDefaultTemplate anonymize
set $!new = $msg;
# Replace credit cards
if re_match($msg,'([0-9]{13,16})')
@weshofmann
weshofmann / README.md
Last active August 28, 2023 10:27
QNAP NAS: Nvidia Hardware Transcoding in Plex and Emby Docker Containers

QNAP NAS: Nvidia Hardware Transcoding in Plex and Emby Docker Containers

Background

Last week I added an Nvidia Quadro P620 to my QNAP TVS-872XT NAS. For the last few days, I've been trying to get both Plex and Emby docker containers to actually use the Nvidia card for encoding and decoding media streams.

The instructions included in the linuxserver/plex DockerHub container indicate that to use Nvidia hardware decoding, you must first install the docker-nvidia2 runtime from Nvidia. Since QNap

default.conf

server {
    listen 443;
    server_name homelab.example.com;

    access_log /var/log/nginx/homelab.example.com.access.log;
    error_log /var/log/nginx/homelab.example.com.error.log;

root /var/www/html;

@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@almays
almays / gist:3928668
Created October 21, 2012 21:55
Unix conf: Sendy nginx rewrite rules
index index.php index.html;
root /your/path/to/the/sendy;
location = / {
index index.php;
}
location / {
if (!-f $request_filename){
rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;