Downloads · 30 days
0
TheBloke/Chinese-Alpaca-33B-SuperHOT-8K-GGML
Chinese-Alpaca-33B-SuperHOT-8K-GGML is a machine learning model from TheBloke. 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 other.
<div style="width: 100%;" <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;" </div <div style="display: flex; justify-content: space-betwee…
Downloads · 30 days
0
Access
Public
Updated Jun 30, 2023
Repo size
121 GB
Likes
7
Public
Click a slice to open those files.
.bin121 GB · 100%
From the Hugging Face model README
These files are GGML format model files for Minlik's Chinese Alpaca 33B Merged.
These are SuperHOT GGMLs with an increased context length. SuperHOT is a new system that employs RoPE to expand context beyond what was originally possible for a model. It was discovered and developed by kaiokendev.
In order to use the increased context length, you can presently use:
Support is also expected to come to llama.cpp, however work is still being done to find the optimal implementation.
To use the increased context with KoboldCpp, simply use --contextsize to set the desired context, eg --contextsize 4096 or --contextsize 8192.
NOTE: Increased context length is an area seeing rapid developments and improvements. It is quite possible that these models may be superseded by new developments in the coming days. If that's the case, I will remove them, or update this README as appropriate.
These GGMLs will work with any llama.cpp-compatible GGML client that supports k-quants.
However the increased context length won't work without specific support. See the note in the introduction for details on using increased context.
The new methods available are:
Refer to the Provided Files table below to see what files use which methods, and how.
<!-- compatibility_ggml end -->| Name | Quant method | Bits | Size | Max RAM required | Use case |
|---|---|---|---|---|---|
| chinese-alpaca-33b-superhot-8k.ggmlv3.q4_0.bin | q4_0 | 4 | 18.44 GB | 20.94 GB | Original llama.cpp quant method, 4-bit. |
| chinese-alpaca-33b-superhot-8k.ggmlv3.q4_1.bin | q4_1 | 4 | 20.48 GB | 22.98 GB | Original llama.cpp quant method, 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. |
| chinese-alpaca-33b-superhot-8k.ggmlv3.q5_0.bin | q5_0 | 5 | 22.53 GB | 25.03 GB | Original llama.cpp quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. |
| chinese-alpaca-33b-superhot-8k.ggmlv3.q5_1.bin | q5_1 | 5 | 24.58 GB | 27.08 GB | Original llama.cpp quant method, 5-bit. Even higher accuracy, resource usage and slower inference. |
| chinese-alpaca-33b-superhot-8k.ggmlv3.q8_0.bin | q8_0 | 8 | 34.82 GB | 37.32 GB | Original llama.cpp quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
Note: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
koboldcppOn Linux I use the following command line to launch the KoboldCpp UI with OpenCL aceleration and a context size of 4096:
python ./koboldcpp.py --stream --unbantokens --threads 8 --usecublas --gpulayers 100 chinese-alpaca-33b-superhot-8k.ggmlv3.q4_K_M.bin
Change --gpulayers 100 to the number of layers you want/are able to offload to the GPU. Remove it if you don't have GPU acceleration.
For OpenCL acceleration, change --usecublas to --useclblast 0 0. You may need to change the second 0 to 1 if you have both an iGPU and a discrete GPU.
For further support, and discussions on these models and AI in general, join us at:
Thanks to the chirper.ai team!
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
Special thanks to: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
Patreon special mentions: zynix , ya boyyy, Trenton Dambrowitz, Imad Khwaja, Alps Aficionado, chris gileta, John Detwiler, Willem Michiel, RoA, Mano Prime, Rainer Wilmers, Fred von Graf, Matthew Berman, Ghost , Nathan LeClaire, Iucharbius , Ai Maven, Illia Dulskyi, Joseph William Delisle, Space Cruiser, Lone Striker, Karl Bernard, Eugene Pentland, Greatston Gnanesh, Jonathan Leane, Randy H, Pierre Kircher, Willian Hasse, Stephen Murray, Alex , terasurfer , Edmond Seymore, Oscar Rangel, Luke Pendergrass, Asp the Wyvern, Junyu Yang, David Flickinger, Luke, Spiking Neurons AB, subjectnull, Pyrater, Nikolai Manek, senxiiz, Ajan Kanaga, Johann-Peter Hartmann, Artur Olbinski, Kevin Schuppel, Derek Yates, Kalila, K, Talal Aujan, Khalefa Al-Ahmad, Gabriel Puliatti, John Villwock, WelcomeToTheClub, Daniel P. Andersen, Preetika Verma, Deep Realms, Fen Risland, trip7s trip, webtim, Sean Connelly, Michael Levine, Chris McCloskey, biorpg, vamX, Viktor Bowallius, Cory Kujawski.
Thank you to all my generous patrons and donaters!
<!-- footer end -->This is a second prototype of SuperHOT, this time 30B with 8K context and no RLHF, using the same technique described in the github blog. Tests have shown that the model does indeed leverage the extended context at 8K.
You will need to use either the monkeypatch or, if you are already using the monkeypatch, change the scaling factor to 0.25 and the maximum sequence length to 8192
I trained the LoRA with the following configuration:
加入中文词表并继续预训练中文Embedding,并在此基础上继续使用指令数据集finetuning,得到的中文Alpaca-33B模型。
模型转换用到的相关base及lora模型如下:
详情可参考:https://github.com/ymcui/Chinese-LLaMA-Alpaca/releases/tag/v4.0
pip install sentencepiece
pip install transformers>=4.28.0
import torch
import transformers
from transformers import LlamaTokenizer, LlamaForCausalLM
def generate_prompt(text):
return f"""Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{text}
### Response:"""
tokenizer = LlamaTokenizer.from_pretrained('minlik/chinese-alpaca-33b-merged')
model = LlamaForCausalLM.from_pretrained('minlik/chinese-alpaca-33b-merged').half().to('cuda')
model.eval()
text = '第一个登上月球的人是谁?'
prompt = generate_prompt(text)
input_ids = tokenizer.encode(prompt, return_tensors='pt').to('cuda')
with torch.no_grad():
output_ids = model.generate(
input_ids=input_ids,
max_new_tokens=128,
temperature=1,
top_k=40,
top_p=0.9,
repetition_penalty=1.15
).cuda()
output = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(output.replace(prompt, '').strip())