Downloads · 30 days
56
4% of all-time downloads
nxnhjrjtbjfzhrovwl/limarp-llongma2-8k-gguf-f16
limarp-llongma2-8k-gguf-f16 is a machine learning model from nxnhjrjtbjfzhrovwl. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as agpl-3.0.
This repository contains the unquantized merge of limarp-llongma2-8k lora in gguf format.
Downloads · 30 days
56
4% of all-time downloads
All-time downloads
1.5K
Public
Repo size
26 GB
Likes
2
Public
Click a slice to open those files.
.gguf26 GB · 100%
From the Hugging Face model README
This repository contains the unquantized merge of limarp-llongma2-8k lora in gguf format.
You can quantize the f16 gguf to the quantization of your choice by following the below steps:
quantize.exe limarp-llongma2-13b.f16.gguf limarp-llongma2-13b.q4_0.gguf q4_0
The below are the contents of the original model card:
LimaRP-LLongMA2-8k is an experimental Llama2 finetune narrowly focused on novel-style roleplay chatting, and a continuation of the previously released LimaRP-llama2 with a larger number of training tokens (+95%).
To considerably facilitate uploading, distribution and merging with other models, LoRA adapters are provided. LimaRP-LLongMA2 LoRA adapters, as their name suggests, are intended to be applied on LLongMA-2 models with 8k context (7B and 13B) and their derivatives.
Data updates may be posted in the future. The current version is v3.
This is an experimental attempt at creating an RP-oriented fine-tune using a manually-curated, high-quality dataset of human-generated conversations. The main rationale for this are the observations from Zhou et al.. The authors suggested that just 1000-2000 carefully curated training examples may yield high quality output for assistant-type chatbots. This is in contrast with the commonly employed strategy where a very large number of training examples (tens of thousands to even millions) of widely varying quality are used.
For LimaRP a similar approach was used, with the difference that the conversational data is almost entirely human-generated. Every training example is manually compiled and selected to comply with subjective quality parameters, with virtually no chance for OpenAI-style alignment responses to come up.
The model is intended to approximate the experience of 1-on-1 roleplay as observed on many Internet forums dedicated on roleplaying. It must be used with a specific format similar to that of this template:
<<SYSTEM>>
Character's Persona: {bot character description}
User's Persona: {user character description}
Scenario: {what happens in the story}
Play the role of Character. You must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User. Character should respond with messages of medium length.
<<AIBOT>>
Character: {utterance}
<<HUMAN>>
User: {utterance}
[etc.]
With <<SYSTEM>>, <<AIBOT>> and <<HUMAN>> being special instruct-mode sequences. The text under curly braces must be replaced with appropriate text in natural language. Replace User and Character with actual character names.
This more graphical breakdown of the prompt format with a practical example might make it clearer:

text-generation-webui as a backendCharacter and User in the above template with your desired names." ". Other formats are not supported (= not in the training data).<<SYSTEM>> does not need to be written exactly as depicted, but should mention that Character and User will engage in roleplay and specify the length of Character's messages
tiny, short, average, long, huge, humongous. However, there might not have been enough training examples for each length for this instruction to have a significant impact. The preferred lengths for this type of role-playing are average or long.Here are a few example SillyTavern character cards following the required format; download and import into SillyTavern. Feel free to modify and adapt them to your purposes.
And here is a sample of how the model is intended to behave with proper chat and prompt formatting: https://files.catbox.moe/egfd90.png
It's possible to make the model automatically generate random character information and scenario by adding just <<SYSTEM>> and the character name in text completion mode in text-generation-webui, as done here (click to enlarge). The format generally closely matches that of the training data:

The model has not been tested for:
Furthermore, the model is not intended nor expected to provide factual and accurate information on any subject.
The model will show biases similar to those observed in niche roleplaying forums on the Internet, besides those exhibited by the base model.
The model may easily output disturbing and socially inappropriate content and therefore should not be used by minors or within environments where a general audience is expected. Its outputs will have in general a strong NSFW bias unless the character card/description de-emphasizes it.
Download and load with text-generation-webui as a back-end application. It's suggested to start the webui via command line. Assuming you have copied the LoRA files under a subdirectory called lora/limarp-llongma2-7b, you would use something like this for the 7B model:
python server.py --api --verbose --model LLongMA-7B --lora limarp-llongma2-7b
When using 4-bit bitsnbytes it is suggested to use double quantization to increase accuracy. The starting command may be something like this:
python server.py --verbose --api --model LLongMA-2-13B --lora limarp13-llongma2-13b --load-in-4bit --use_double_quant
Then, preferably use SillyTavern as a front-end using the following settings:

In addition of enabling the instruct mode with the correct sequences, it's particularly important to enable "Include names", as the model was trained with them at the start of each utterance. If it's disabled, the model can start getting confused and often write for the user in its responses.
To take advantage of this model's larger context length, unlock the context size and set it up to any length up to 8192 tokens, depending on your VRAM constraints. On most consumer GPUs this will likely need to be set to a lower value.

It is recommended to ban/disable the EOS token as it can for instance apparently give artifacts or tokenization issues when it ends up getting generated close to punctuation or quotation marks, at least in SillyTavern. These would typically happen with AI responses.

The training data comprises about 1500 manually edited roleplaying conversation threads from various Internet RP forums, for about 24 megabytes of data.
Character and Scenario information was initially filled in for every thread with the help of mainly gpt-4. Later on this has been accomplished with a custom summarizer. Conversations in the dataset are almost entirely human-generated except for a handful of messages. Character names in the RP stories have been isolated and replaced with standard placeholder strings. Usernames, out-of-context (OOC) messages and personal information have not been intentionally included.
The version of LimaRP uploaded on this repository was trained using a small NVidia A40 cluster in 8-bit with regular LoRA adapters and 8-bit AdamW optimizer.
The most important settings were as follows:
All linear LoRA layers were targeted.
An effective batch size of 1 was found to yield the lowest loss curves during fine-tuning. It was also found that using --train_on_source False with the entire training example at the output yields similar results. These LoRAs have been trained in this way (similar to what was done with Guanaco or as with unsupervised finetuning).
Finetuning this model on 8 NVidia A40 48GB in parallel takes about 25 minutes (7B) or 45 minutes (13B).