diff --git a/.gitattributes b/.gitattributes index 53d7257..3c2ac8e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,47 +1,47 @@ *.7z filter=lfs diff=lfs merge=lfs -text *.arrow filter=lfs diff=lfs merge=lfs -text *.bin filter=lfs diff=lfs merge=lfs -text -*.bin.* filter=lfs diff=lfs merge=lfs -text *.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text *.ftz filter=lfs diff=lfs merge=lfs -text *.gz filter=lfs diff=lfs merge=lfs -text *.h5 filter=lfs diff=lfs merge=lfs -text *.joblib filter=lfs diff=lfs merge=lfs -text *.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text *.model filter=lfs diff=lfs merge=lfs -text *.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text *.onnx filter=lfs diff=lfs merge=lfs -text *.ot filter=lfs diff=lfs merge=lfs -text *.parquet filter=lfs diff=lfs merge=lfs -text *.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text *.pt filter=lfs diff=lfs merge=lfs -text *.pth filter=lfs diff=lfs merge=lfs -text *.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text *.tflite filter=lfs diff=lfs merge=lfs -text *.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text *.xz filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text -*.zstandard filter=lfs diff=lfs merge=lfs -text -*.tfevents* filter=lfs diff=lfs merge=lfs -text -*.db* filter=lfs diff=lfs merge=lfs -text -*.ark* filter=lfs diff=lfs merge=lfs -text -**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text -**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text -**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text -*.safetensors filter=lfs diff=lfs merge=lfs -text -*.ckpt filter=lfs diff=lfs merge=lfs -text -*.gguf* filter=lfs diff=lfs merge=lfs -text -*.ggml filter=lfs diff=lfs merge=lfs -text -*.llamafile* filter=lfs diff=lfs merge=lfs -text -*.pt2 filter=lfs diff=lfs merge=lfs -text -*.mlmodel filter=lfs diff=lfs merge=lfs -text -*.npy filter=lfs diff=lfs merge=lfs -text -*.npz filter=lfs diff=lfs merge=lfs -text -*.pickle filter=lfs diff=lfs merge=lfs -text -*.pkl filter=lfs diff=lfs merge=lfs -text -*.tar filter=lfs diff=lfs merge=lfs -text -*.wasm filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text -*tfevents* filter=lfs diff=lfs merge=lfs -text \ No newline at end of file +*tfevents* filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q2_K.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q5_0.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q6_K.gguf filter=lfs diff=lfs merge=lfs -text +yi-34b-200k-aezakmi-v2.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md index 6c7d13c..2485fe9 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,429 @@ --- -license: Apache License 2.0 +base_model: adamo1139/Yi-34B-200K-AEZAKMI-v2 +datasets: +- adamo1139/AEZAKMI_v2 +inference: false +license: other +license_link: LICENSE +license_name: yi-license +model_creator: Adam +model_name: Yi 34B 200K Aezakmi v2 +model_type: yi +prompt_template: '<|im_start|>system -#model-type: -##如 gpt、phi、llama、chatglm、baichuan 等 -#- gpt + {system_message}<|im_end|> -#domain: -##如 nlp、cv、audio、multi-modal -#- nlp + <|im_start|>user -#language: -##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa -#- cn + {prompt}<|im_end|> -#metrics: -##如 CIDEr、Blue、ROUGE 等 -#- CIDEr + <|im_start|>assistant -#tags: -##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他 -#- pretrained - -#tools: -##如 vllm、fastchat、llamacpp、AdaSeq 等 -#- vllm + ' +quantized_by: TheBloke +tags: +- llm +- fine-tune +- yi --- -### 当前模型的贡献者未提供更加详细的模型介绍。模型文件和权重,可浏览“模型文件”页面获取。 -#### 您可以通过如下git clone命令,或者ModelScope SDK来下载模型 + + + + +
+TheBloke's LLM work is generously supported by a grant from andreessen horowitz (a16z)
如果您是本模型的贡献者,我们邀请您根据模型贡献文档,及时完善模型卡片内容。
\ No newline at end of file +## How to use with LangChain + +Here are guides on using llama-cpp-python and ctransformers with LangChain: + +* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) +* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) + + + + + +## Discord + +For further support, and discussions on these models and AI in general, join us at: + +[TheBloke AI's Discord server](https://discord.gg/theblokeai) + +## Thanks, and how to contribute + +Thanks to the [chirper.ai](https://chirper.ai) team! + +Thanks to Clay from [gpus.llm-utils.org](llm-utils)! + +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. + +* Patreon: https://patreon.com/TheBlokeAI +* Ko-Fi: https://ko-fi.com/TheBlokeAI + +**Special thanks to**: Aemon Algiz. + +**Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros + + +Thank you to all my generous patrons and donaters! + +And thank you again to a16z for their generous grant. + + + + +# Original model card: Adam's Yi 34B 200K Aezakmi v2 + + +## Model description + +Yi-34B 200K base model fine-tuned on AEZAKMI v2 dataset. Training took around 25 hours on single local RTX 3090 Ti. +It's like airoboros but with less gptslop, no refusals and less typical language used by RLHFed OpenAI models. +Say goodbye to "It's important to remember"! \ +Prompt format is standard chatml. Don't expect it to be good at math, riddles or be crazy smart. My end goal with AEZAKMI is to create a cozy free chatbot. +Cost of this fine-tune is about $10 in electricity. It took me 3 tries to get it right. +Base model used for fine-tuning was 200k context Yi-34B-Llama model shared by larryvrh. + +I had to lower max_positional_embeddings in config.json and model_max_length for training to start, otherwise I was OOMing straight away. +My first attempt had max_positional_embeddings set to 16384 and model_max_length set to 200000. This allowed fine-tuning to finish, but that model was broken after applying LoRA and merging it. \ +This attempt had both max_position_embeddings and model_max_length set to 4096, which worked perfectly fine. + +## Prompt Format + +I recommend using ChatML format, as this was used during fine-tune. \ +Here's a prompt format you should use, you can set a different system message, model seems to respect that fine, so it wasn't overfitted. + +``` +<|im_start|>system +A chat with uncensored assistant.<|im_end|> +<|im_start|>user +{prompt}<|im_end|> +<|im_start|>assistant +``` + +## Intended uses & limitations + +Use is limited by Yi license. + +## Known Issues + +I recommend to set repetition penalty to something around 1.05 to avoid repetition. So far I had good experience running this model with temperature 1.2. +Stories have ChatGPT like paragraph spacing, I will work on this in the future maybe, not a high priority + +Unrestricted-ness of the v2 isn't quite something that I am happy with yet, especially using prompt "A chat.". \ +With a slightly modifed prompt it works much better, I recommend using "A chat with uncensored assistant.", it's stupid but it helps a lot. \ +Base Yi-34B model is contaminated with refusals and this contaminates all models trained on Yi-34B \ +My next project is to attempt to de-contaminate base Yi-34B 4K and Yi-34B 200K using DPO with preferred data coming from uncontaminated raw models. I plan to release that dataset openly. + +I was made aware of the frequent occurrence of the phrase "sending shivers down a spine" in the generations during RP of v1, so I fixed those samples - it should be better now. \ +I can hold up to 24000 ctx with 4.65bpw exl2 version and 8-bit cache - long context should work as good as other models trained on 200k version of Yi-34B \ +There is also some issue with handling long system messages for RP, I was planning to investigate it for v2 but I didn't. + + +## Axolotl training parameters + +- bnb_4bit_use_double_quant: true +- is_llama_derived_model: true +- load_in_4bit: true +- adapter: qlora +- sequence_len: 1400 +- sample_packing: true +- lora_r: 16 +- lora_alpha: 32 +- lora_target_modules: + - q_proj + - v_proj + - k_proj + - o_proj + - gate_proj + - down_proj + - up_proj + - lora_target_linear: true + - pad_to_sequence_len: false + - micro_batch_size: 1 + - gradient_accumulation_steps: 1 + - num_epochs: 2.4 + - optimizer: adamw_bnb_8bit + - lr_scheduler: constant + - learning_rate: 0.00005 + - train_on_inputs: false + - group_by_length: false + - bf16: true + - bfloat16: true + - flash_optimum: false + - gradient_checkpointing: true + - flash_attention: true + - seed: 42 + + +## Upcoming + +I will probably be working on de-contaminating base Yi-34B model now. \ +My second run of AEZAKMI v2 fine-tune was just 0.15 epochs and I really like how natural this model is and how rich is it's vocabulary. I will try to train less to hit the sweetspot. \ +I will be uploading LoRA adapter for that second run that was just 0.15 epochs. \ +I believe that I might have gotten what I want if I would have stopped training sooner. I don't have checkpoints older than 1500 steps back so I would need to re-run training to get it back. + + diff --git a/config.json b/config.json new file mode 100644 index 0000000..3d78b09 --- /dev/null +++ b/config.json @@ -0,0 +1,3 @@ +{ + "model_type": "yi" +} \ No newline at end of file diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..159097f --- /dev/null +++ b/configuration.json @@ -0,0 +1 @@ +{"framework": "pytorch", "task": "others", "allow_remote": true} \ No newline at end of file diff --git a/yi-34b-200k-aezakmi-v2.Q2_K.gguf b/yi-34b-200k-aezakmi-v2.Q2_K.gguf new file mode 100644 index 0000000..b5cb39b --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q2_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef6ca794e473bb96d1f503c8a713f3db01c543f5de2f785674ffc794dc411ba0 +size 14557680896 diff --git a/yi-34b-200k-aezakmi-v2.Q3_K_L.gguf b/yi-34b-200k-aezakmi-v2.Q3_K_L.gguf new file mode 100644 index 0000000..521911e --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q3_K_L.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e42ece5483a3bbe0f5f1a43284f767adb5d69e400e7523e45ca85c0219d734d +size 18141250816 diff --git a/yi-34b-200k-aezakmi-v2.Q3_K_M.gguf b/yi-34b-200k-aezakmi-v2.Q3_K_M.gguf new file mode 100644 index 0000000..10320d1 --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q3_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7acf2f6900e0850028ac7323d5a360023b1d1ce688ba8abec8ada783131107cd +size 16638379264 diff --git a/yi-34b-200k-aezakmi-v2.Q3_K_S.gguf b/yi-34b-200k-aezakmi-v2.Q3_K_S.gguf new file mode 100644 index 0000000..a008b78 --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q3_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28e7db154b7fd8d390d76dfcb73e38249196d2ff68d05faa06f14f2be90a86b2 +size 14962099456 diff --git a/yi-34b-200k-aezakmi-v2.Q4_0.gguf b/yi-34b-200k-aezakmi-v2.Q4_0.gguf new file mode 100644 index 0000000..da45451 --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q4_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8e90dafce83269d8a767bd354641011f26844546561a66c5db35c945ec66db5 +size 19468334336 diff --git a/yi-34b-200k-aezakmi-v2.Q4_K_M.gguf b/yi-34b-200k-aezakmi-v2.Q4_K_M.gguf new file mode 100644 index 0000000..7c38dba --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:887a0e32ebca45b6511bd8c8d53ce45972242cbb6eac9c340a0cfb7a95ec36e9 +size 20660516096 diff --git a/yi-34b-200k-aezakmi-v2.Q4_K_S.gguf b/yi-34b-200k-aezakmi-v2.Q4_K_S.gguf new file mode 100644 index 0000000..d4c0a34 --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q4_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7baf9f414a2c1430341ec39bd1cecdc1fb96f328f2cd79c2c04b3891f4dabe5 +size 19545404672 diff --git a/yi-34b-200k-aezakmi-v2.Q5_0.gguf b/yi-34b-200k-aezakmi-v2.Q5_0.gguf new file mode 100644 index 0000000..3682e68 --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q5_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:223600640cf70d4f2f74eda5b9c03d9cebc060e6cdfb7affc1bac155538dda28 +size 23709496576 diff --git a/yi-34b-200k-aezakmi-v2.Q5_K_M.gguf b/yi-34b-200k-aezakmi-v2.Q5_K_M.gguf new file mode 100644 index 0000000..a17d10c --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c496f2a512b95bf97f41ae4d40fd2599cdab1d6b4b876ffe900c524bcad4496 +size 24323650816 diff --git a/yi-34b-200k-aezakmi-v2.Q5_K_S.gguf b/yi-34b-200k-aezakmi-v2.Q5_K_S.gguf new file mode 100644 index 0000000..bfbc310 --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q5_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2892670071ece983e3a237df642aa28f48917313266cec4e3a8bb16e512275dd +size 23709496576 diff --git a/yi-34b-200k-aezakmi-v2.Q6_K.gguf b/yi-34b-200k-aezakmi-v2.Q6_K.gguf new file mode 100644 index 0000000..ae4923f --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q6_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7b823c36d59d2bd1cac786b48c87f2398581c0d5e08be0cc3f15077c65b8174 +size 28215731456 diff --git a/yi-34b-200k-aezakmi-v2.Q8_0.gguf b/yi-34b-200k-aezakmi-v2.Q8_0.gguf new file mode 100644 index 0000000..7178144 --- /dev/null +++ b/yi-34b-200k-aezakmi-v2.Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c46b03eed8bfaae99a864f8c410f51971d87d85879a783de62a08b2716123763 +size 36544087296