Downloads · 30 days
862
5% of all-time downloads
rozek/LLaMA-2-7B-32K-Instruct_GGUF
LLaMA-2-7B-32K-Instruct_GGUF is a text generation model from rozek. Use it when you need the model to write or continue text. The card lists the license as llama2.
Together Computer, Inc. has released Llama-2-7B-32K-Instruct, a model based on Meta AI's LLaMA-2-7B, but fine-tuned for context lengths up to 32K using "Position Interpolation" and "Rotary Position Embeddings"
Downloads · 30 days
862
5% of all-time downloads
All-time downloads
16.5K
Public
Repo size
74 GB
Likes
4
Public
Click a slice to open those files.
.gguf74 GB · 100%
From the Hugging Face model README
Together Computer, Inc. has released Llama-2-7B-32K-Instruct, a model based on Meta AI's LLaMA-2-7B, but fine-tuned for context lengths up to 32K using "Position Interpolation" and "Rotary Position Embeddings" (RoPE).
While the current version of llama.cpp already supports such large context lengths, it requires quantized files in the new GGUF format - and that's where this repo comes in: it contains the following quantizations of the original weights from Together's fined-tuned model
Nota bene: while RoPE makes inferences with large contexts possible, you still need an awful lot of RAM when doing so. And since "32K" does not mean that you always have to use a context size of 32768 (only that the model was fine-tuned for that size), it is recommended that you keep your context as small as possible
If you need quantizations for Together Computer's Llama-2-7B-32K model, then look for LLaMA-2-7B-32K_GGUF
Since the author does not want arbitrary Python stuff to loiter on his computer, the quantization was done using Docker.
Assuming that you have the Docker Desktop installed on your system and also have a basic knowledge of how to use it, you may just follow the instructions shown below in order to generate your own quantizations:
Nota bene: you will need 30+x GB of free disk space, at least - depending on your quantization
llama.cpp_in_Docker<br>this folder will later be mounted into the Docker
container and store the quantization resultsllama.cpp_in_Docker (let's call the new folder LLaMA-2-7B-32K-Instruct)basic-python image - just use one of
the most popular onesdocker run --rm \
-v ./llama.cpp_in_Docker:/llama.cpp \
-t basic-python /bin/bash
(you may have to adjust the path to your local folder)
apt update
apt-get install software-properties-common -y
apt-get update
apt-get install g++ git make -y
cd /llama.cpp
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
/llama.cpp/llama.cpp/Makefile, right-click on it and
choose "Edit file"aarch64, and - in the line found (which looks like ifneq ($(filter aarch64%,$(UNAME_M)),)) -
change ifneq to ifeqmake
python3 -m pip install -r requirements.txt
python3 convert.py ../LLaMA-2-7B-32K-Instruct
./quantize ../LLaMA-2-7B-32K-Instruct/ggml-model-f16.gguf \
../LLaMA-2-7B-32K-Instruct/LLaMA-2-7B-32K-Instruct-Q4_0.gguf Q4_0
basic-python image may also be deleted (manually) unless you plan to use it again in the near futureYou are now free to move the quanitization results to where you need them and run inferences with context lengths up to 32K (depending on the amount of memory you will have available - long contexts need a lot of RAM)
Concerning the license(s):