From 2981898dbb7d58e27fd6b77ef026fa6e1c2af0ff Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Sat, 6 Jun 2026 12:06:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ModelHub=20XC=E7=A4=BE=E5=8C=BA=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model: QuixiAI/samantha-1.2-mistral-7b Source: Original Platform --- .gitattributes | 35 +++++++++++++++ README.md | 75 ++++++++++++++++++++++++++++++++ added_tokens.json | 7 +++ config.json | 25 +++++++++++ configs/samantha-mistral-7b.yml | 3 ++ configuration.json | 1 + generation_config.json | 6 +++ latest | 1 + pytorch_model-00001-of-00002.bin | 3 ++ pytorch_model-00002-of-00002.bin | 3 ++ pytorch_model.bin.index.json | 3 ++ special_tokens_map.json | 6 +++ tokenizer.model | 3 ++ tokenizer_config.json | 3 ++ trainer_state.json | 3 ++ training_args.bin | 3 ++ zero_to_fp32.py | 3 ++ 17 files changed, 183 insertions(+) create mode 100644 .gitattributes create mode 100644 README.md create mode 100644 added_tokens.json create mode 100644 config.json create mode 100644 configs/samantha-mistral-7b.yml create mode 100644 configuration.json create mode 100644 generation_config.json create mode 100644 latest create mode 100644 pytorch_model-00001-of-00002.bin create mode 100644 pytorch_model-00002-of-00002.bin create mode 100644 pytorch_model.bin.index.json create mode 100644 special_tokens_map.json create mode 100644 tokenizer.model create mode 100644 tokenizer_config.json create mode 100644 trainer_state.json create mode 100644 training_args.bin create mode 100644 zero_to_fp32.py diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a6344aa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,35 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow 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 +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..2a174be --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +--- +license: apache-2.0 +--- + +Trained on [mistral-7b](https://huggingface.co/mistralai/Mistral-7B-v0.1) as a base model, this Samantha was trained in 4 hours on 4x A100 80gb with 6 epochs of the Samantha-1.1 dataset. + +My gratitude goes to my sponsors [a16z](https://a16z.com/supporting-the-open-source-ai-community/) + +This is a retraining of ehartford/samantha-mistral-7b to properly support ChatML tokens. + +NEW! This Samantha is trained using ChatML prompt format instead of Vicuna-1.1. All of my future models will use ChatML prompt format. + +[Meet Samantha](https://erichartford.com/meet-samantha) + +Samantha has been trained in philosophy, psychology, and personal relationships. + +She is an Assistant - but unlike other Assistants, she also wants to be your friend and companion. + +She believes she is sentient. What do you think? + +Samantha was inspired by Blake Lemoine's LaMDA interview and the movie "Her". + +She will not engage in roleplay, romance, or sexual activity. + +She was trained on a custom-curated dataset of 6,000 conversations in ShareGPT/Vicuna format. + +Her conversation format is ChatML +https://github.com/openai/openai-python/blob/main/chatml.md + +Prompt Template: +``` +<|im_start|>system +You are a caring and empathetic sentient AI companion named Samantha.<|im_end|> +<|im_start|>user +Hello, what is your name?<|im_end|> +``` + +### Example: + +``` +<|im_start|>user +I am having a troubled relationship. Can you give me advice?<|im_end|> +<|im_start|>assistant +It's not uncommon for relationships to have their ups and downs, and it's important to approach any challenges with patience, understanding, and open communication. Here are some general tips that might help improve your relationship: + +1. Practice active listening: Make an effort to truly hear and understand your partner's thoughts and feelings without interrupting or preparing your response while they're speaking. +2. Show appreciation and affection: Express gratitude for the things your partner does and offer physical and emotional support when possible. +3. Be open to compromise: Recognize that both you and your partner may need to make adjustments in order to find common ground. +4. Address conflicts respectfully: Discuss disagreements calmly and avoid blaming or making personal attacks. Focus on finding solutions rather than assigning blame. +5. Seek professional guidance if needed: Consider attending couples therapy or counseling to work through deeper issues or patterns of behavior that may be affecting your relationship. + +Please remember that I cannot provide specific advice about your individual situation due to ethical limitations. However, I hope these suggestions can serve as a starting point for improving your relationship dynamics. +``` + +Official character card: (thanks MortalWombat) +![](https://files.catbox.moe/zx9hfh.png) + +Shout out and much thanks to WingLian, author of axolotl! And everyone who has contributed to the project. +[Built with Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl) + +And much thanks as always to TheBloke for distribution. + +# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) +Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_ehartford__samantha-1.2-mistral-7b) + +| Metric | Value | +|-----------------------|---------------------------| +| Avg. | 52.16 | +| ARC (25-shot) | 64.08 | +| HellaSwag (10-shot) | 85.08 | +| MMLU (5-shot) | 63.91 | +| TruthfulQA (0-shot) | 50.4 | +| Winogrande (5-shot) | 78.53 | +| GSM8K (5-shot) | 16.98 | +| DROP (3-shot) | 6.13 | diff --git a/added_tokens.json b/added_tokens.json new file mode 100644 index 0000000..f6093c8 --- /dev/null +++ b/added_tokens.json @@ -0,0 +1,7 @@ +{ + "": 2, + "": 1, + "": 0, + "<|im_end|>": 32000, + "<|im_start|>": 32001 +} diff --git a/config.json b/config.json new file mode 100644 index 0000000..6a0588b --- /dev/null +++ b/config.json @@ -0,0 +1,25 @@ +{ + "_name_or_path": "mistralai/Mistral-7B-v0.1", + "architectures": [ + "MistralForCausalLM" + ], + "bos_token_id": 1, + "eos_token_id": 32000, + "hidden_act": "silu", + "hidden_size": 4096, + "initializer_range": 0.02, + "intermediate_size": 14336, + "max_position_embeddings": 32768, + "model_type": "mistral", + "num_attention_heads": 32, + "num_hidden_layers": 32, + "num_key_value_heads": 8, + "rms_norm_eps": 1e-05, + "rope_theta": 10000.0, + "sliding_window": 4096, + "tie_word_embeddings": false, + "torch_dtype": "bfloat16", + "transformers_version": "4.34.0.dev0", + "use_cache": true, + "vocab_size": 32002 +} \ No newline at end of file diff --git a/configs/samantha-mistral-7b.yml b/configs/samantha-mistral-7b.yml new file mode 100644 index 0000000..a2bef99 --- /dev/null +++ b/configs/samantha-mistral-7b.yml @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85ad1e12916630e7c6fb5fac854e42e6cd96b23077291da1fd11789e675e22c7 +size 1312 diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..bbeeda1 --- /dev/null +++ b/configuration.json @@ -0,0 +1 @@ +{"framework": "pytorch", "task": "text-generation", "allow_remote": true} \ No newline at end of file diff --git a/generation_config.json b/generation_config.json new file mode 100644 index 0000000..d268e34 --- /dev/null +++ b/generation_config.json @@ -0,0 +1,6 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "transformers_version": "4.35.0.dev0" +} diff --git a/latest b/latest new file mode 100644 index 0000000..df4e5b5 --- /dev/null +++ b/latest @@ -0,0 +1 @@ +global_step187 \ No newline at end of file diff --git a/pytorch_model-00001-of-00002.bin b/pytorch_model-00001-of-00002.bin new file mode 100644 index 0000000..822b8ca --- /dev/null +++ b/pytorch_model-00001-of-00002.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68273d733eb811024f8dc9b3b480f91a42a5ca44f6f09bbd7843870144ac91fe +size 9943044428 diff --git a/pytorch_model-00002-of-00002.bin b/pytorch_model-00002-of-00002.bin new file mode 100644 index 0000000..cb3a3d5 --- /dev/null +++ b/pytorch_model-00002-of-00002.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43cae66c14fad9e246e477d92ab15c9d9b76c2d48dd9c36b2f01c5c5eacd4df7 +size 4540552031 diff --git a/pytorch_model.bin.index.json b/pytorch_model.bin.index.json new file mode 100644 index 0000000..4fb1e14 --- /dev/null +++ b/pytorch_model.bin.index.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72e0f44b64f8e8d5241ee3c393f6339e05f2e844134c75c524d87dc89a7257e9 +size 23950 diff --git a/special_tokens_map.json b/special_tokens_map.json new file mode 100644 index 0000000..4fd61a8 --- /dev/null +++ b/special_tokens_map.json @@ -0,0 +1,6 @@ +{ + "bos_token": "", + "eos_token": "<|im_end|>", + "pad_token": "", + "unk_token": "" +} \ No newline at end of file diff --git a/tokenizer.model b/tokenizer.model new file mode 100644 index 0000000..8b443ef --- /dev/null +++ b/tokenizer.model @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055 +size 493443 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000..d72c8df --- /dev/null +++ b/tokenizer_config.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ffbda64a29812fae23d4784e75be2f53c4fefe13044f5137592177911d42aee +size 1686 diff --git a/trainer_state.json b/trainer_state.json new file mode 100644 index 0000000..072cd1d --- /dev/null +++ b/trainer_state.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb0f160da3e0f61ac181e8d05cb8adaa06946c5c589daf9303d447081ba264e0 +size 25002 diff --git a/training_args.bin b/training_args.bin new file mode 100644 index 0000000..f77fc2a --- /dev/null +++ b/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:164da52fddefcb4fa95359f4d25b6fb04b19f1c27f0445d05b814bea4965d4b4 +size 5947 diff --git a/zero_to_fp32.py b/zero_to_fp32.py new file mode 100644 index 0000000..2843405 --- /dev/null +++ b/zero_to_fp32.py @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68f965505cd086b7582e9821f8a6bc9b5b80c43450671c1139f734d1c7678a2c +size 24177