aashish1904 commited on
Commit
77f37b9
·
verified ·
1 Parent(s): f2a4518

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +76 -0
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ language:
5
+ - en
6
+ - fr
7
+ - de
8
+ - es
9
+ - it
10
+ - pt
11
+ - ru
12
+ - zh
13
+ - ja
14
+ license: apache-2.0
15
+
16
+ ---
17
+
18
+ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
19
+
20
+ # QuantFactory/Mistral-Nemo-Instruct-2407-abliterated-GGUF
21
+ This is quantized version of [natong19/Mistral-Nemo-Instruct-2407-abliterated](https://huggingface.co/natong19/Mistral-Nemo-Instruct-2407-abliterated) created using llama.cpp
22
+
23
+ # Original Model Card
24
+
25
+
26
+ # Mistral-Nemo-Instruct-2407-abliterated
27
+
28
+ ## Introduction
29
+
30
+ Abliterated version of [Mistral-Nemo-Instruct-2407](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407), a Large Language Model (LLM) trained jointly by Mistral AI and NVIDIA that significantly outperforms existing models smaller or similar in size.
31
+ The model's strongest refusal directions have been ablated via weight orthogonalization, but the model may still refuse your request, misunderstand your intent, or provide unsolicited advice regarding ethics or safety.
32
+
33
+ ## Key features
34
+ - Trained with a **128k context window**
35
+ - Trained on a large proportion of **multilingual and code data**
36
+ - Drop-in replacement of Mistral 7B
37
+
38
+ ## Quickstart
39
+
40
+ ```python
41
+ from transformers import AutoModelForCausalLM, AutoTokenizer
42
+ import torch
43
+
44
+ model_id = "natong19/Mistral-Nemo-Instruct-2407-abliterated"
45
+ device = "cuda"
46
+
47
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
48
+
49
+ conversation = [{"role": "user", "content": "Where's the capital of France?"}]
50
+
51
+ tool_use_prompt = tokenizer.apply_chat_template(
52
+ conversation,
53
+ tokenize=False,
54
+ add_generation_prompt=True,
55
+ )
56
+
57
+ inputs = tokenizer(tool_use_prompt, return_tensors="pt", return_token_type_ids=False).to(device)
58
+
59
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
60
+
61
+ outputs = model.generate(**inputs, max_new_tokens=128)
62
+ print(tokenizer.decode(outputs[0][len(inputs["input_ids"][0]):], skip_special_tokens=True))
63
+ ```
64
+
65
+ ## Evaluation
66
+
67
+ Evaluation framework: lm-evaluation-harness 0.4.2
68
+
69
+ | Benchmark | Mistral-Nemo-Instruct-2407 | Mistral-Nemo-Instruct-2407-abliterated |
70
+ | :--- | :---: | :---: |
71
+ | ARC (25-shot) | 65.9 | 65.8 |
72
+ | GSM8K (5-shot) | 76.2 | 75.2 |
73
+ | HellaSwag (10-shot) | 84.3 | 84.3 |
74
+ | MMLU (5-shot) | 68.4 | 68.8 |
75
+ | TruthfulQA (0-shot) | 54.9 | 55.0 |
76
+ | Winogrande (5-shot) | 82.2 | 82.6 |