From 2856fbc4b1cebe1242d80bb2c98c75c106535617 Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Fri, 28 Aug 2026 20:14:17 +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: janhq/Mistral-7B-Instruct-v0.1-GGUF Source: Original Platform --- .gitattributes | 47 +++++++++++++++ README.md | 87 ++++++++++++++++++++++++++++ configuration.json | 1 + mistral-7b-instruct-v0.1.Q3_K_M.gguf | 3 + mistral-7b-instruct-v0.1.Q4_K_M.gguf | 3 + mistral-7b-instruct-v0.1.Q5_K_M.gguf | 3 + mistral-7b-instruct-v0.1.Q8_0.gguf | 3 + 7 files changed, 147 insertions(+) create mode 100644 .gitattributes create mode 100644 README.md create mode 100644 configuration.json create mode 100644 mistral-7b-instruct-v0.1.Q3_K_M.gguf create mode 100644 mistral-7b-instruct-v0.1.Q4_K_M.gguf create mode 100644 mistral-7b-instruct-v0.1.Q5_K_M.gguf create mode 100644 mistral-7b-instruct-v0.1.Q8_0.gguf diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..53d7257 --- /dev/null +++ b/.gitattributes @@ -0,0 +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 +*.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 +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack 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 +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +saved_model/**/* 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 +*.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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..d67ead8 --- /dev/null +++ b/README.md @@ -0,0 +1,87 @@ +--- +license: apache-2.0 +pipeline_tag: text-generation +tags: +- finetuned +inference: + parameters: + temperature: 0.7 +--- + +# Model Card for Mistral-7B-Instruct-v0.1 + +The Mistral-7B-Instruct-v0.1 Large Language Model (LLM) is a instruct fine-tuned version of the [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) generative text model using a variety of publicly available conversation datasets. + +For full details of this model please read our [paper](https://arxiv.org/abs/2310.06825) and [release blog post](https://mistral.ai/news/announcing-mistral-7b/). + +## Instruction format + +In order to leverage instruction fine-tuning, your prompt should be surrounded by `[INST]` and `[/INST]` tokens. The very first instruction should begin with a begin of sentence id. The next instructions should not. The assistant generation will be ended by the end-of-sentence token id. + +E.g. +``` +text = "[INST] What is your favourite condiment? [/INST]" +"Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen! " +"[INST] Do you have mayonnaise recipes? [/INST]" +``` + +This format is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating) via the `apply_chat_template()` method: + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer + +device = "cuda" # the device to load the model onto + +model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1") +tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1") + +messages = [ + {"role": "user", "content": "What is your favourite condiment?"}, + {"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"}, + {"role": "user", "content": "Do you have mayonnaise recipes?"} +] + +encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt") + +model_inputs = encodeds.to(device) +model.to(device) + +generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True) +decoded = tokenizer.batch_decode(generated_ids) +print(decoded[0]) +``` + +## Model Architecture +This instruction model is based on Mistral-7B-v0.1, a transformer model with the following architecture choices: +- Grouped-Query Attention +- Sliding-Window Attention +- Byte-fallback BPE tokenizer + +## Troubleshooting +- If you see the following error: +``` +Traceback (most recent call last): +File "", line 1, in +File "/transformers/models/auto/auto_factory.py", line 482, in from_pretrained +config, kwargs = AutoConfig.from_pretrained( +File "/transformers/models/auto/configuration_auto.py", line 1022, in from_pretrained +config_class = CONFIG_MAPPING[config_dict["model_type"]] +File "/transformers/models/auto/configuration_auto.py", line 723, in getitem +raise KeyError(key) +KeyError: 'mistral' +``` + +Installing transformers from source should solve the issue +pip install git+https://github.com/huggingface/transformers + +This should not be required after transformers-v4.33.4. + +## Limitations + +The Mistral 7B Instruct model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance. +It does not have any moderation mechanisms. We're looking forward to engaging with the community on ways to +make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs. + +## The Mistral AI Team + +Albert Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix, William El Sayed. \ No newline at end of file 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/mistral-7b-instruct-v0.1.Q3_K_M.gguf b/mistral-7b-instruct-v0.1.Q3_K_M.gguf new file mode 100644 index 0000000..0de32fc --- /dev/null +++ b/mistral-7b-instruct-v0.1.Q3_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d7474d4573970e318120033ea445e3bbb11434be956ba23c2ce263c3f3f7262 +size 3518986432 diff --git a/mistral-7b-instruct-v0.1.Q4_K_M.gguf b/mistral-7b-instruct-v0.1.Q4_K_M.gguf new file mode 100644 index 0000000..9b5c15b --- /dev/null +++ b/mistral-7b-instruct-v0.1.Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b923e4d4670a1e9e3ec7292a17df546d27904ac33acadc6c47ee195a1c60854 +size 4368439488 diff --git a/mistral-7b-instruct-v0.1.Q5_K_M.gguf b/mistral-7b-instruct-v0.1.Q5_K_M.gguf new file mode 100644 index 0000000..b654fd9 --- /dev/null +++ b/mistral-7b-instruct-v0.1.Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a284555fb9d4f73275737392d65a784fdbf6bff0f19885e0e2a35e99df688e42 +size 5131409600 diff --git a/mistral-7b-instruct-v0.1.Q8_0.gguf b/mistral-7b-instruct-v0.1.Q8_0.gguf new file mode 100644 index 0000000..5205cb2 --- /dev/null +++ b/mistral-7b-instruct-v0.1.Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea5782333d6a9ab70a57b54157ac0828a121ecc15b05a46f0a720c905fb16f6e +size 7695857856