legolasyiu commited on
Commit
94417b9
·
verified ·
1 Parent(s): 568b96e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -0
README.md CHANGED
@@ -12,6 +12,119 @@ tags:
12
  pipeline_tag: question-answering
13
  ---
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  # Uploaded model
16
 
17
  - **Developed by:** EpistemeAI2
 
12
  pipeline_tag: question-answering
13
  ---
14
 
15
+ <img src="https://huggingface.co/EpistemeAI/Fireball-Mistral-Nemo-Base-2407-v1-DPO2/resolve/main/fireball.JPG" width="200"/>
16
+
17
+
18
+ # Fireball-12B-v1.3a Philosophers
19
+ This model is super fine-tune with philosophy in science, math, epistemology, to provide high quality responses(from first fine-tune) than Llama-3.1-8B and Google Gemma 2 9B.
20
+ Super fine tuned with various datasets.
21
+
22
+ # Benchmark
23
+
24
+ Example from Fireball-12B
25
+ <img src="https://huggingface.co/EpistemeAI/Fireball-12B/resolve/main/benchmark2.jpg"/>
26
+
27
+ V1.3a benchmark will show later this quarter.
28
+
29
+ ## Training Dataset
30
+ Fine tuned with various datasets.
31
+
32
+
33
+ # Model Card for Fireball-12B-v1.3a Philosophers
34
+
35
+ The Heavy fine-tuned Mistral-Nemo-Base-2407 Large Language Model (LLM) is a pretrained generative text model of 12B parameters trained jointly by Mistral AI and NVIDIA, it significantly outperforms existing models smaller or similar in size.
36
+
37
+ For more details about this model please refer to our release [blog post](https://mistral.ai/news/mistral-nemo/).
38
+
39
+ ## Key features
40
+ - Released under the **Apache 2 License**
41
+ - Pre-trained and instructed versions
42
+ - Trained with a **128k context window**
43
+ - Trained on a large proportion of **multilingual and code data**
44
+ - Drop-in replacement of Mistral 7B
45
+
46
+ ## Model Architecture
47
+ Mistral Nemo is a transformer model, with the following architecture choices:
48
+ - **Layers:** 40
49
+ - **Dim:** 5,120
50
+ - **Head dim:** 128
51
+ - **Hidden dim:** 14,436
52
+ - **Activation Function:** SwiGLU
53
+ - **Number of heads:** 32
54
+ - **Number of kv-heads:** 8 (GQA)
55
+ - **Vocabulary size:** 2**17 ~= 128k
56
+ - **Rotary embeddings (theta = 1M)**
57
+
58
+ # Guardrail/Moderation guide:
59
+ For guardrailing and moderating prompts against indirect/direct prompt injections and jailbreaking, please follow the SentinelShield AI GitHub repository:
60
+ [SentinelShield AI](https://github.com/tomtyiu/SentinelShieldAI)
61
+
62
+
63
+ #### Demo
64
+
65
+ After installing `mistral_inference`, a `mistral-demo` CLI command should be available in your environment.
66
+
67
+ ### Prompt instructions - Alpaca style prompt(recommended):
68
+
69
+ ```py
70
+ f"""Below is an instruction that describes a task. \
71
+ Write a response that appropriately completes the request.
72
+ ### Instruction:
73
+ {x['instruction']}
74
+ ### Input:
75
+ {x['input']}
76
+ ### Response:
77
+ """
78
+ ```
79
+
80
+ ### Transformers
81
+
82
+ > [!IMPORTANT]
83
+ > NOTE: Until a new release has been made, you need to install transformers from source:
84
+ > ```sh
85
+ > pip install mistral_inference
86
+ > pip install mistral-demo
87
+ > pip install git+https://github.com/huggingface/transformers.git
88
+ > ```
89
+ If you want to use Hugging Face `transformers` to generate text, you can do something like this.
90
+ ```py
91
+ from transformers import AutoModelForCausalLM, AutoTokenizer
92
+ model_id = "EpistemeAI2/Fireball-12B-v1.13a-philosophers"
93
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
94
+ model = AutoModelForCausalLM.from_pretrained(model_id)
95
+ inputs = tokenizer("Hello my name is", return_tensors="pt")
96
+ outputs = model.generate(**inputs, max_new_tokens=20)
97
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
98
+ ```
99
+ ## Accelerator mode:
100
+ ```py
101
+ pip install accelerate #GPU A100/L4
102
+ from transformers import AutoModelForCausalLM, AutoTokenizer
103
+ from accelerate import Accelerator
104
+ # Initialize the accelerator
105
+ accelerator = Accelerator()
106
+ # Define the model ID
107
+ model_id = "EpistemeAI2/Fireball-12B-v1.13a-philosophers"
108
+ # Load the tokenizer
109
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
110
+ # Load the model and prepare it for distributed setup using accelerate
111
+ model = AutoModelForCausalLM.from_pretrained(model_id)
112
+ # Move the model to the appropriate device using accelerate
113
+ model, = accelerator.prepare(model)
114
+ # Prepare inputs
115
+ inputs = tokenizer("Hello my name is", return_tensors="pt").to(accelerator.device)
116
+ # Generate outputs with the model
117
+ outputs = model.generate(**inputs, max_new_tokens=20)
118
+ # Decode and print the outputs
119
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
120
+ ```
121
+ > [!TIP]
122
+ > Unlike previous Mistral models, Mistral Nemo requires smaller temperatures. We recommend to use a temperature of 0.3.
123
+ ## Note
124
+ `EpistemeAI/Fireball-12B-v1.2` is a pretrained base model and therefore does not have any moderation mechanisms. Go to Guardrail/Moderation guide section for moderation guide
125
+
126
+
127
+
128
  # Uploaded model
129
 
130
  - **Developed by:** EpistemeAI2