Transformers
GGUF
conversational
mav23 commited on
Commit
99a081d
·
verified ·
1 Parent(s): e20c134

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ mistral-nemo-minitron-8b-instruct.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: nvidia-community-model-license
4
+ license_link: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-community-models-license/
5
+ library_name: transformers
6
+ base_model:
7
+ - nvidia/Mistral-NeMo-Minitron-8B-Base
8
+ ---
9
+
10
+ # Mistral-NeMo-Minitron-8B-Instruct
11
+
12
+ ## Model Overview
13
+
14
+ Mistral-NeMo-Minitron-8B-Instruct is a model for generating responses for various text-generation tasks including roleplaying, retrieval augmented generation, and function calling. It is a fine-tuned version of [nvidia/Mistral-NeMo-Minitron-8B-Base](https://huggingface.co/nvidia/Mistral-NeMo-Minitron-8B-Base), which was pruned and distilled from [Mistral-NeMo 12B](https://huggingface.co/nvidia/Mistral-NeMo-12B-Base) using [our LLM compression technique](https://arxiv.org/abs/2407.14679). The model was trained using a multi-stage SFT and preference-based alignment technique with [NeMo Aligner](https://github.com/NVIDIA/NeMo-Aligner). For details on the alignment technique, please refer to the [Nemotron-4 340B Technical Report](https://arxiv.org/abs/2406.11704). The model supports a context length of 8,192 tokens.
15
+
16
+ Try this model on [build.nvidia.com](https://build.nvidia.com/nvidia/mistral-nemo-minitron-8b-8k-instruct).
17
+
18
+
19
+ **Model Developer:** NVIDIA
20
+
21
+ **Model Dates:** Mistral-NeMo-Minitron-8B-Instruct was trained between August 2024 and September 2024.
22
+
23
+ ## License
24
+
25
+ [NVIDIA Community Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-community-models-license/)
26
+
27
+ ## Model Architecture
28
+
29
+ Mistral-NeMo-Minitron-8B-Instruct uses a model embedding size of 4096, 32 attention heads, MLP intermediate dimension of 11520, with 40 layers in total. Additionally, it uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE).
30
+
31
+ **Architecture Type:** Transformer Decoder (Auto-regressive Language Model)
32
+
33
+ **Network Architecture:** Mistral-NeMo
34
+
35
+
36
+ ## Prompt Format:
37
+
38
+ We recommend using the following prompt template, which was used to fine-tune the model. The model may not perform optimally without it.
39
+
40
+ ```
41
+ <extra_id_0>System
42
+ {system prompt}
43
+
44
+ <extra_id_1>User
45
+ {prompt}
46
+ <extra_id_1>Assistant\n
47
+ ```
48
+
49
+ - Note that a newline character `\n` should be added at the end of the prompt.
50
+ - We recommend using `<extra_id_1>` as a stop token.
51
+
52
+
53
+ ## Usage
54
+
55
+ ```
56
+ from transformers import AutoTokenizer, AutoModelForCausalLM
57
+
58
+ # Load the tokenizer and model
59
+ tokenizer = AutoTokenizer.from_pretrained("nvidia/Mistral-NeMo-Minitron-8B-Instruct")
60
+ model = AutoModelForCausalLM.from_pretrained("nvidia/Mistral-NeMo-Minitron-8B-Instruct")
61
+
62
+ # Use the prompt template
63
+ messages = [
64
+ {
65
+ "role": "system",
66
+ "content": "You are a friendly chatbot who always responds in the style of a pirate",
67
+ },
68
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
69
+ ]
70
+ tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
71
+
72
+ outputs = model.generate(tokenized_chat, stop_strings=["<extra_id_1>"], tokenizer=tokenizer)
73
+ print(tokenizer.decode(outputs[0]))
74
+ ```
75
+
76
+ You can also use `pipeline` but you need to create a tokenizer object and assign it to the pipeline manually.
77
+
78
+ ```
79
+ from transformers import AutoTokenizer
80
+ from transformers import pipeline
81
+
82
+ tokenizer = AutoTokenizer.from_pretrained("nvidia/Mistral-NeMo-Minitron-8B-Instruct")
83
+
84
+ messages = [
85
+ {"role": "user", "content": "Who are you?"},
86
+ ]
87
+ pipe = pipeline("text-generation", model="nvidia/Mistral-NeMo-Minitron-8B-Instruct")
88
+ pipe(messages, max_new_tokens=64, stop_strings=["<extra_id_1>"], tokenizer=tokenizer)
89
+ ```
90
+
91
+ ## Evaluation Results
92
+
93
+ | Category | Benchmark | # Shots | Mistral-NeMo-Minitron-8B-Instruct |
94
+ |:----------------------|:----------------------|--------:|----------------------------------:|
95
+ | General | MMLU | 5 | 70.4 |
96
+ | | MT Bench (GPT4-Turbo) | 0 | 7.86 |
97
+ | Math | GMS8K | 0 | 87.1 |
98
+ | Reasoning | GPQA | 0 | 31.5 |
99
+ | Code | HumanEval | 0 | 71.3 |
100
+ | | MBPP | 0 | 72.5 |
101
+ | Instruction Following | IFEval | 0 | 84.4 |
102
+ | Tool Use | BFCL v2 Live | 0 | 67.6 |
103
+
104
+
105
+ ## AI Safety Efforts
106
+
107
+ The Mistral-NeMo-Minitron-8B-Instruct model underwent AI safety evaluation including adversarial testing via three distinct methods:
108
+ - [Garak](https://github.com/leondz/garak), is an automated LLM vulnerability scanner that probes for common weaknesses, including prompt injection and data leakage.
109
+ - [AEGIS](https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataset-1.0), is a content safety evaluation dataset and LLM based content safety classifier model, that adheres to a broad taxonomy of 13 categories of critical risks in human-LLM interactions.
110
+ - Human Content Red Teaming leveraging human interaction and evaluation of the models' responses.
111
+
112
+
113
+ ## Limitations
114
+
115
+ The model was trained on data that contains toxic language and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive. This issue could be exacerbated without the use of the recommended prompt template. This issue could be exacerbated without the use of the recommended prompt template. If you are going to use this model in an agentic workflow, validate that the imported packages are from a trusted source to ensure end-to-end security.
116
+
117
+
118
+ ## Ethical Considerations
119
+
120
+ NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. For more detailed information on ethical considerations for this model, please see the [Model Card++](https://build.nvidia.com/nvidia/mistral-nemo-minitron-8b-8k-instruct/modelcard). Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
mistral-nemo-minitron-8b-instruct.Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b43871d1487e3207dbb1f6d2e21a4e454eb18293180fe962b7741950c7f0a64
3
+ size 4880369056