Skip to content

Instantly share code, notes, and snippets.

@al-swaiti
al-swaiti / convert-chunks.py
Created September 11, 2024 16:29
GGUF-Convert-Chunks
import os
import torch
import gguf
import numpy as np
import argparse
from tqdm import tqdm
from safetensors.torch import load_file, save_file
CHUNK_SIZE = 100 # Number of tensors to process in each chunk
QUANTIZATION_THRESHOLD = 1024
@al-swaiti
al-swaiti / qunata.py
Last active August 4, 2024 20:41
quantization of "pixart sigma"
# https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/main/transformer
# https://huggingface.co/blog/quanto-diffusers
#python -m venv quanta or conda whatever
#source ./quanta/bin/activate >>> default (bash shell)
# pip install --force git+https://github.com/huggingface/diffusers.git
# pip install torch optimum.quanto
#run first part to create model
@al-swaiti
al-swaiti / improve_fonts.md
Created September 5, 2023 13:35 — forked from YoEight/improve_fonts.md
Improve fonts archlinux

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

@al-swaiti
al-swaiti / index.html
Created February 2, 2023 03:39
terminal , CMD
<div class="container">
<p>/><span class="typed-text"></span><span class="cursor">&nbsp;</span></p>
</div>
@al-swaiti
al-swaiti / index.html
Created February 2, 2023 02:57
Parallax scroll animation
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 750 500" preserveAspectRatio="xMidYMax slice">
<defs>
<!-- Scene 1 Gradient -->
<linearGradient id="grad1" x1="-154.32" y1="263.27" x2="-154.32" y2="374.3"
gradientTransform="matrix(-1, 0, 0, 1.36, 231.36, -100.14)" gradientUnits="userSpaceOnUse">
<stop offset="0.07" stop-color="#9c536b" />
<stop offset="0.98" stop-color="#d98981" />
</linearGradient>
<radialGradient id="bg_grad" cx="375" cy="-35" r="318.69" gradientUnits="userSpaceOnUse">
<stop offset="0.1" stop-color="#F5C54E" id="sun" />
@al-swaiti
al-swaiti / index.html
Created February 2, 2023 02:44
Parallax scroll animation
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 750 500" preserveAspectRatio="xMidYMax slice">
<defs>
<!-- Scene 1 Gradient -->
<linearGradient id="grad1" x1="-154.32" y1="263.27" x2="-154.32" y2="374.3"
gradientTransform="matrix(-1, 0, 0, 1.36, 231.36, -100.14)" gradientUnits="userSpaceOnUse">
<stop offset="0.07" stop-color="#9c536b" />
<stop offset="0.98" stop-color="#d98981" />
</linearGradient>
<radialGradient id="bg_grad" cx="375" cy="-35" r="318.69" gradientUnits="userSpaceOnUse">
<stop offset="0.1" stop-color="#F5C54E" id="sun" />