This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| # a script for running https://hf.co/unsloth/gemma-4-31B-it-GGUF | |
| # on 5090 hardware, targeting long ctx | |
| MODEL_PATH="$HOME/model-weights/llm/gguf/gemma4/gemma-4-31B-it-UD-Q4_K_XL.gguf" | |
| MMPROJ_PATH="$HOME/model-weights/llm/gguf/gemma4/mmproj-BF16.gguf" | |
| CONTEXT_LENGTH=65536 | |
| PORT=8674 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| CLI tool to check Python files for missing docstrings, type hints, and lazy docstrings. | |
| A 'lazy' docstring is one that only contains a summary without documenting | |
| arguments or return values when the function has 2+ parameters or returns something. | |
| Usage: | |
| python doc_check.py src/ --check-lazy-docstrings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Image distortion tool for creating "deep fried" meme-filters. | |
| Dependencies: | |
| pip install universal-pathlib Pillow numpy scipy matplotlib | |
| Usage: | |
| python deepfryer.py --help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Modern PDF compressor with LLM-optimized defaults | |
| # Requires: ghostscript (gs) | |
| VERSION="1.0.0" | |
| SCRIPT_NAME=$(basename "$0") | |
| # Defaults (LLM preset) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import time | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| # 1. Basic Timer Context Manager | |
| class Timer: | |
| def __init__(self, name="Task"): | |
| self.name = name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| slightly optimized image tiling for vlms based on "Jina-VLM: Small Multilingual Vision Language Model" | |
| Based on the pseudocode in Appendix A.1: https://arxiv.org/abs/2512.04032 | |
| """ | |
| import math | |
| from typing import List, Tuple | |
| import torch | |
| import torch.nn.functional as F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #@markdown add auto-Colab formatting with `IPython.display` | |
| from IPython.display import HTML, display | |
| # colab formatting | |
| def set_css(): | |
| display( | |
| HTML( | |
| """ | |
| <style> | |
| pre { | |
| white-space: pre-wrap; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| EGGROLL: Evolution Guided General Optimization via Low-rank Learning | |
| NumPy Implementation - Direct translation of working PyTorch code | |
| Paper: arXiv:2511.16652v1 | |
| """ | |
| import numpy as np | |
| from dataclasses import dataclass | |
| from typing import Tuple, Optional |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| UL2 Data Collator for PyTorch + Transformers | |
| ============================================== | |
| Standalone implementation of UL2 (Unified Language Learner) denoising objectives | |
| for encoder-decoder models (T5, UL2, Flan-T5, etc.). | |
| Based on: "Unifying Language Learning Paradigms" (Tay et al., 2022) | |
| https://arxiv.org/abs/2205.05131 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Apache-2.0 | |
| GVE + SimSIMD video deduplication CLI via https://gzn00417.github.io/GVE/ | |
| Design highlights | |
| - Embeddings: GVE (Qwen2.5-VL based) last-token pooled + ℓ2-normalized (bf16/float16), per paper/model card. | |
| - Test-time policy: 8 frames baseline, scale with duration (16/32/48) for long videos; ~200 visual tokens per frame. |
NewerOlder