Skip to content

Instantly share code, notes, and snippets.

@ChrisHayduk
ChrisHayduk / merge_qlora_with_quantized_model.py
Last active June 24, 2024 05:55
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
@teknium1
teknium1 / shard_weights.py
Created April 29, 2023 04:32 — forked from younesbelkada/shard_weights.py
A script to shard any model on the Hugging Face format
import torch
import os
import json
import argparse
parser = argparse.ArgumentParser(description='Sharding Hugging Face models')
parser.add_argument('--sharding_factor', default=4, type=int, help='Sharding factor - aka how many shards to create')
parser.add_argument('--source_model_path', default="t5-v1_1-xl", type=str, help='Relative path to the source model folder')
parser.add_argument('--sharded_model_path', default="t5-v1_1-xl-sharded", type=str, help='Relative path to the target sharded model folder')
args = parser.parse_args()
How to Create Your YouTube API Credentials
https://vidible.zendesk.com/hc/en-us/articles/207036056-How-to-Create-Your-YouTube-API-Credentials
Creating your YouTube API Credentials is accomplished by performing to main stages:
Stage I - Creating a Google OAuth 2.0 Web application client.
Stage II - Creating a YouTube refresh token.