Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abdoiiii
abdoiiii / grpo_demo.py
Created February 1, 2025 05:15 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@abdoiiii
abdoiiii / FAQ.md
Created January 28, 2025 00:05 — forked from ngxson/FAQ.md
convert ARM NEON to WASM SIMD prompt

What is your setup?

Just chat.deepseek.com with prompts adapted from this gist.

Does it work in one-shot or I have to prompt it multiple times?

  • For the qX_0 variants, they are actually quite straight-forward so deepseek can come up with a correct result in 1 shot.
  • For the qX_K it's more complicated, I would say most of the time I need to re-prompt it 4 to 8 more times.
  • The most difficult was q6_K, the code never works until I ask it to only optimize one specific part, while leaving the rest intact (so it does not mess up everything)

How to Extract All Data from WhatsApp

Follow these steps to extract all your WhatsApp data, including messages, in a secure and comprehensive way.


Disclaimer:

This guide is intended to help you access your own data only. Unauthorized access to data that does not belong to you may violate privacy laws and terms of service. Use this guide responsibly.


@abdoiiii
abdoiiii / house_finder.ipynb
Created February 29, 2024 04:15 — forked from jen6/house_finder.ipynb
직방을 크롤링해 전세자금 대출이 가능한 집 알아보기
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abdoiiii
abdoiiii / ollama_fast_speech_text_speech.py
Created February 15, 2024 18:26 — forked from lucataco/ollama_fast_speech_text_speech.py
speech to text to speech using Ollama
""" To use: install Ollama, clone OpenVoice, run this script in the OpenVoice directory
brew install portaudio
brew install git-lfs
git lfs install
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
@abdoiiii
abdoiiii / fast_speech_text_speech.py
Created February 15, 2024 18:24 — forked from thomwolf/fast_speech_text_speech.py
speech to text to speech
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
pip install whisper pynput pyaudio
"""
from openai import OpenAI
import time
https://github.com/sergeyprokudin/smplpix
https://github.com/sebastianstarke/AI4Animation
https://github.com/shinework/photoshot
https://github.com/Winfredy/SadTalker
https://github.com/yoyo-nb/Thin-Plate-Spline-Motion-Model
https://github.com/harlanhong/CVPR2022-DaGAN
https://github.com/harlanhong/awesome-talking-head-generation
https://github.com/yerfor/GeneFace
https://github.com/shrubb/latent-pose-reenactment
https://github.com/TheTempAccount/Co-Speech-Motion-Generation
@abdoiiii
abdoiiii / avoid_colab_close.js
Created August 6, 2023 09:20 — forked from amrrs/avoid_colab_close.js
How to avoid Google Colab Session Closing automatically?
//credit - https://huggingface.co/blog/fine-tune-wav2vec2-english (Patrick von Platen)
// run this on your Chrome / Browser Console (where Colab is present)
function ConnectButton(){
console.log("Connect pushed");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
}
var colab = setInterval(ConnectButton,60000);
@abdoiiii
abdoiiii / falcon_pdf_bot.py
Created July 16, 2023 11:28 — forked from abhishekkrthakur/falcon_pdf_bot.py
This is a reference to the YouTube tutorial here: https://youtu.be/hSQY4N1u3v0
import argparse
from pdfminer.high_level import extract_text
from sentence_transformers import SentenceTransformer, CrossEncoder, util
from text_generation import Client
PREPROMPT = "Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\n"
PROMPT = """"Use the following pieces of context to answer the question at the end.
If you don't know the answer, just say that you don't know, don't try to