Skip to content

Instantly share code, notes, and snippets.

View vlbosch's full-sized avatar

Vincent Bosch vlbosch

  • Poortvliet, Nederland
View GitHub Profile
@N8python
N8python / MORE.py
Last active December 7, 2024 22:01
faster every day
from mlx_lm import load
import mlx.core as mx
from mlx.utils import tree_flatten, tree_map, tree_unflatten
import numpy as np
# Copyright © 2023-2024 Apple Inc.
import contextlib
import copy
import glob
import importlib
@awni
awni / mlx_api_prompt.py
Created August 20, 2024 15:43
Meta Llama 3.1 with MLX LM and the MLX Python API as Context
import os
import mlx.core as mx
from mlx_lm import load, generate
filename = os.path.join(os.path.dirname(mx.__file__), "core/__init__.pyi")
with open(filename, 'r') as fid:
prompt = fid.read()
prompt += "\nHow do you write a self-attention layer using the above API in MLX?"
model, tokenizer = load("mlx-community/meta-Llama-3.1-8B-Instruct-4bit")
@ParkWardRR
ParkWardRR / install_searxng.sh
Last active June 7, 2025 11:21
This script automates the installation and setup of SearXNG using Podman on AlmaLinux. It includes steps to update the system, install Podman, pull the SearXNG Docker image, create necessary configuration files, and run the SearXNG container with the correct port mapping.
#!/bin/bash
# Filename: install_searxng.sh
# Description: This script automates the installation and setup of SearXNG using Podman on AlmaLinux.
# It includes steps to update the system, install Podman, pull the SearXNG Docker image, create necessary
# configuration files, run the SearXNG container with the correct port mapping, and set up a systemd service
# to ensure the container starts automatically on system boot.
# Update system
sudo dnf update -y
@philipturner
philipturner / UnifiedGEMMKernel.swift
Last active October 8, 2024 05:26
Single shader source that supports every hardware architecture, problem size, and precision
//
// main.swift
// UnifiedGEMMKernel
//
// Created by Philip Turner on 5/29/24.
//
import Metal
#if os(macOS)
import IOKit
@GamerGirlandCo
GamerGirlandCo / code.md
Created June 15, 2020 18:53 — forked from ChenYCL/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code

Please make fork of this, as this can be removed by Github.com sooner or later.

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI