Skip to content

Instantly share code, notes, and snippets.

View vroomfondel's full-sized avatar

Henning Thieß vroomfondel

View GitHub Profile
import httpx
import json
from httpx import ByteStream
from openai import OpenAI
import instructor
from pydantic import BaseModel
from loguru import logger
@vroomfondel
vroomfondel / startollama.sh
Created May 25, 2024 14:57
start-script for running a locally built version of ollama but mounted into a docker container
#!/bin/bash
cd $(dirname $0) || exit 1
OLLAMA_MODELDIR="${HOME}/ollama_models"
OLLAMA_RUNDIR="${HOME}/ollama"
OLLAMA_ALLOW_LOCAL_EXECUTABLE=1
OLLAMA_NUM_PARALLEL=2
echo $0 :: PWD: $(pwd)
@vroomfondel
vroomfondel / build_me.sh
Created May 25, 2024 14:56
ollama build script with patch for llama3 llama.cpp BPE pretokenization issue
#!/bin/bash
cd $(dirname "$0") || exit 123
# builds a trimmed version of ollama (i.e. check the CPU flags and CUDA architectures below)
# in my case: AMD Ryzen | RTX4090
#
# to be put run in directory cloned from ollama and HEAD pointing to some tag
# git clone [email protected]:ollama/ollama.git
# in that cloned repo-dir: