Instructions to use athirdpath/Nethena-20b-Glue-LORA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use athirdpath/Nethena-20b-Glue-LORA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="athirdpath/Nethena-20b-Glue-LORA")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("athirdpath/Nethena-20b-Glue-LORA") model = AutoModelForCausalLM.from_pretrained("athirdpath/Nethena-20b-Glue-LORA") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use athirdpath/Nethena-20b-Glue-LORA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "athirdpath/Nethena-20b-Glue-LORA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "athirdpath/Nethena-20b-Glue-LORA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/athirdpath/Nethena-20b-Glue-LORA
- SGLang
How to use athirdpath/Nethena-20b-Glue-LORA with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "athirdpath/Nethena-20b-Glue-LORA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "athirdpath/Nethena-20b-Glue-LORA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "athirdpath/Nethena-20b-Glue-LORA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "athirdpath/Nethena-20b-Glue-LORA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use athirdpath/Nethena-20b-Glue-LORA with Docker Model Runner:
docker model run hf.co/athirdpath/Nethena-20b-Glue-LORA
This model is a fine-tuned version of NeverSleep/Nethena-20B on a private dataset. It achieves the following results on the evaluation set:
- Loss: 1.3864
Model description
athirdpath/Nethena-20b-Glued-LORA is a 128 rank LORA for RP, trained on NeverSleep/Nethena-20B. It is unalligned and NSFW-oriented.
This is a test, exploring the effects of "gluing" the components of the 20b model together to reduce the iconic word replacement errors, increase lucidity, and improve recall.
Training and evaluation data
The private ~500k token dataset used to train the LORA was Alpaca formatted and focused on 4 primary categories:
- Medical texts (on psychology, reproductive organs, anatomy, and pregnancy). These are formatted so the model, in character as a doctor or therapist, answers a patient's question in short to medium form.
- Excerpts from short stories and novellas (erotic and romantic) centered around both realistic and fantastic situations, covering several fetishes as well. These are sliced into ~2048 token chunks, and these long-form responses are all tied to the command “Enter narrator mode.” in the instructions.
- A selection from PIPPA, using a wide keyword search for tokens associated with low quality human or AI data to remove those responses, then a positive search was done for words and phrases associated with a higher reading level. These are converted to Alpaca with “Enter RP mode.” in all the instruction fields.
- ~18k tokens of GPT-4 generated data on role-playing from various characters’ perspectives, focusing on different situations and emotions. Includes many multi-turn conversations.
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- gradient_accumulation_steps: 5
- total_train_batch_size: 20
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 10
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.955 | 0.38 | 25 | 1.9037 |
| 1.6598 | 0.75 | 50 | 1.6192 |
| 1.5649 | 1.13 | 75 | 1.5010 |
| 1.4424 | 1.5 | 100 | 1.4424 |
| 1.4142 | 1.88 | 125 | 1.4068 |
| 1.4951 | 2.25 | 150 | 1.3908 |
| 1.4418 | 2.63 | 175 | 1.3864 |
Framework versions
- Transformers 4.34.1
- Pytorch 2.1.0+cu118
- Datasets 2.14.6
- Tokenizers 0.14.1
- Downloads last month
- 3
Model tree for athirdpath/Nethena-20b-Glue-LORA
Base model
NeverSleep/Nethena-20B