Skip to content

Instantly share code, notes, and snippets.

@SlyEcho
SlyEcho / .env
Last active April 2, 2023 20:16
EstGPT script
MASTODON_URL="https://est.social"
MASTODON_TOKEN='xxx'
DEEPL_TOKEN='xxx'
LLAMA_PATH="$HOME/src/llama.cpp/build/bin/main"
LLAMA_MODEL="$HOME/src/llama.cpp/models/alpaca-native-13b-q4_0.bin"
LLAMA_ARGS="--keep 21 -n -1 -t 8 -b 4 -c 2048"
@SlyEcho
SlyEcho / convert-gpt4all-alpaca-oa-codealpaca-lora-13b.py
Created April 18, 2023 14:37
Convert gpt4all-alpaca-oa-codealpaca-lora-13b to a HF checkpoint
# Combined https://github.com/tloen/alpaca-lora/blob/main/export_hf_checkpoint.py and
# https://huggingface.co/jordiclive/gpt4all-alpaca-oa-codealpaca-lora-13b#example-inference-code-note-several-embeddings-need-to-be-loaded-along-with-the-lora-weights-assumes-on-gpu-and-torchfloat16
import os
import torch
import transformers
from peft import PeftModel
from transformers import LlamaForCausalLM, LlamaTokenizer, GenerationConfig
from typing import List, NamedTuple
@SlyEcho
SlyEcho / jeopardy.ipynb
Last active April 25, 2023 09:28
Jeopardy eval
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.