Skip to content

Instantly share code, notes, and snippets.

View iddar's full-sized avatar
🤹‍♂️
code juggling

Iddar Olivares iddar

🤹‍♂️
code juggling
View GitHub Profile
@johndpope
johndpope / killer.sh
Last active May 18, 2026 05:00
use local ai with caution - back up your files - use timeshift to backup system config!
#!/usr/bin/env bash
# Author: Oleh Pshenychnyi
# Date: 13.02.2021
#
# Kill all processes matching a provided pattern.
#
# Usage:
#
# >> bash killer.sh celery
@maderix
maderix / ane_prefill_pipeline.m
Last active May 14, 2026 08:39
ANE Prefill Pipeline — Qwen 3.5 9B on Apple M4 (221 tok/s, 5.05 TFLOPS, FP16)
// Qwen 3.5 9B Prefill Pipeline — ANE (Apple Neural Engine)
//
// 221 tok/s prefill, 5.05 TFLOPS ANE, FP16 weights, no quantization.
// Apple M4 (10-core: 4P+6E), 24 GB, macOS 15.
// Single self-contained file. No external dependencies beyond Apple frameworks.
//
// Architecture (32 layers, 24 DeltaNet + 8 Attention):
// DeltaNet: QKV proj (ANE) → recurrence (CPU/OpenMP) → out proj (ANE) → FFN (ANE)
// Attention: Q/K/V proj (ANE) → causal SDPA (CPU/AMX) → O proj (ANE) → FFN (ANE)
//
@thomwolf
thomwolf / fast_speech_text_speech.py
Last active January 14, 2025 12:13
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
@crasm
crasm / gguf-merge.sh
Last active May 5, 2025 01:08
Shell script for merging TheBloke's .gguf-split model files
#!/bin/sh
log() {
format="$1"; shift
# shellcheck disable=SC2059
>&2 printf "$format\n" "$@"
}
usage() {
>&2 cat <<EOF
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active April 8, 2025 13:49
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@kamidev
kamidev / zig_macos_m1_install.md
Last active April 25, 2023 10:07
Building zig master on M1 Mac
import SwiftUI
let width : CGFloat = 82.0
let height : CGFloat = 82.0
struct ContentView: View {
@State private var toggle = false
var body: some View {
VStack {
Spacer()
ZStack {
Image(systemName: "heart.fill")
//
// ContentView.swift
// HelloStartupAnimation
//
// Created by Apple Design Dev on 1/26/22.
//
import SwiftUI
import PureSwiftUI
//
// ContentView.swift
// ActivityRingAnimation WatchKit Extension
//
// Created by AppleDesignDev on 1/25/22.
//
import SwiftUI
struct ContentView: View {
var body: some View {
TimelineView(.periodic(from: .now, by: 1.0)) { timeline in