Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# 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 |
This file contains 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
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" |