Skip to content

Instantly share code, notes, and snippets.

View khursani8's full-sized avatar
🏠
Working from home

Sani khursani8

🏠
Working from home
View GitHub Profile
@intellectronica
intellectronica / 0.README.md
Last active March 25, 2026 10:00
SKILL: Fetch YouTube Transcript

YouTube Transcript SKILL

Get youtube-transcript.zip

Use this skill to fetch the transcript of a YouTube video, with or without timestamps.

Use this skill with Claude (by extracting it to .claude/skills/) or with any other agent using Skillz.

Note: This skill is unlikely to run successfully on the Claude web app, since access to YouTube is blocked. Use it with Claude Code or other local agents.

@willccbb
willccbb / grpo_demo.py
Last active March 29, 2026 04:24
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
"""
citation:
@misc{brown2025grpodemo,
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models},
author={Brown, William},
ministrations
audible pop
rivulets of
admit it
the ball is in your court
the game is on
the choice is yours
I don't bite... unless you want me to
half-lidded eyes
she worries her bottom lip
@gd3kr
gd3kr / embeddings.py
Created February 15, 2024 20:35
compute embeddings for tweets in tweets.json
"""
a simple script that reads tweets inside a json file, uses openai to compute embeddings and creates two files, metadata.tsv and output.tsv, which cam be used to visualise the tweets and their embeddings in TensorFlow Projector (https://projector.tensorflow.org/)
"""
# obtain tweets.json from https://gist.github.com/gd3kr/948296cf675469f5028911f8eb276dbc
import pandas as pd
import json
from openai import OpenAI
@litagin02
litagin02 / simple_merge.py
Last active February 25, 2024 16:13
Bert-VITS2のモデルマージするやつ(声音・感情表現それぞれを取っ替えたり混ぜたり)
import os
import gradio as gr
import torch
from infer import get_net_g, infer
import utils
voice_keys = ["dec", "flow"]
speech_style_keys = ["enc_p"]
@ChrisHayduk
ChrisHayduk / merge_qlora_with_quantized_model.py
Last active September 27, 2025 08:22
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
@younesbelkada
younesbelkada / train_adapters_transformers.py
Created August 3, 2023 09:43
Train adapters using transformers integration of PEFT
from datasets import load_dataset
import torch
from peft import LoraConfig, prepare_model_for_int8_training
from trl import SFTTrainer
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, AutoTokenizer, TrainingArguments
dataset_name = "timdettmers/openassistant-guanaco"
dataset = load_dataset(dataset_name, split="train")
model_name = "facebook/opt-350m"
@kyo-takano
kyo-takano / few-shot-learning-on-function-calling.ipynb
Last active July 10, 2025 23:32
few-shot-learning-on-function-calling.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@francois-rozet
francois-rozet / flow_matching.py
Last active January 24, 2026 23:48
Flow Matching in 100 LOC
#!/usr/bin/env python
import math
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from sklearn.datasets import make_moons
from torch import Tensor
from tqdm import tqdm
@BramVanroy
BramVanroy / get_words_of_tokens.py
Created June 15, 2022 13:44
Get original words of tokens in HF Tokenizers
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
text = "It 's a pre-tokenized , silly sentence !"
words = text.split()
encoded = tokenizer(words, is_split_into_words=True)
for token, wordid in zip(encoded.tokens(), encoded.word_ids()):
if wordid is not None:
print(token, words[wordid])