Abhaykoul commited on
Commit
dc37558
1 Parent(s): dcdb7f1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +107 -128
README.md CHANGED
@@ -1,132 +1,111 @@
1
- ---
2
- language:
3
- - en
4
- - hi
5
- license: apache-2.0
6
- library_name: transformers
7
- tags:
8
- - mlx
9
- datasets:
10
- - OEvortex/vortex-mini
11
- base_model: OEvortex/HelpingAI-Lite
12
- pipeline_tag: text-generation
13
- model-index:
14
- - name: Mia-1B
15
- results:
16
- - task:
17
- type: text-generation
18
- name: Text Generation
19
- dataset:
20
- name: AI2 Reasoning Challenge (25-Shot)
21
- type: ai2_arc
22
- config: ARC-Challenge
23
- split: test
24
- args:
25
- num_few_shot: 25
26
- metrics:
27
- - type: acc_norm
28
- value: 35.75
29
- name: normalized accuracy
30
- source:
31
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MysteriousAI/Mia-1B
32
- name: Open LLM Leaderboard
33
- - task:
34
- type: text-generation
35
- name: Text Generation
36
- dataset:
37
- name: HellaSwag (10-Shot)
38
- type: hellaswag
39
- split: validation
40
- args:
41
- num_few_shot: 10
42
- metrics:
43
- - type: acc_norm
44
- value: 61.02
45
- name: normalized accuracy
46
- source:
47
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MysteriousAI/Mia-1B
48
- name: Open LLM Leaderboard
49
- - task:
50
- type: text-generation
51
- name: Text Generation
52
- dataset:
53
- name: MMLU (5-Shot)
54
- type: cais/mmlu
55
- config: all
56
- split: test
57
- args:
58
- num_few_shot: 5
59
- metrics:
60
- - type: acc
61
- value: 25.43
62
- name: accuracy
63
- source:
64
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MysteriousAI/Mia-1B
65
- name: Open LLM Leaderboard
66
- - task:
67
- type: text-generation
68
- name: Text Generation
69
- dataset:
70
- name: TruthfulQA (0-shot)
71
- type: truthful_qa
72
- config: multiple_choice
73
- split: validation
74
- args:
75
- num_few_shot: 0
76
- metrics:
77
- - type: mc2
78
- value: 36.92
79
- source:
80
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MysteriousAI/Mia-1B
81
- name: Open LLM Leaderboard
82
- - task:
83
- type: text-generation
84
- name: Text Generation
85
- dataset:
86
- name: Winogrande (5-shot)
87
- type: winogrande
88
- config: winogrande_xl
89
- split: validation
90
- args:
91
- num_few_shot: 5
92
- metrics:
93
- - type: acc
94
- value: 60.38
95
- name: accuracy
96
- source:
97
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MysteriousAI/Mia-1B
98
- name: Open LLM Leaderboard
99
- - task:
100
- type: text-generation
101
- name: Text Generation
102
- dataset:
103
- name: GSM8k (5-shot)
104
- type: gsm8k
105
- config: main
106
- split: test
107
- args:
108
- num_few_shot: 5
109
- metrics:
110
- - type: acc
111
- value: 1.44
112
- name: accuracy
113
- source:
114
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MysteriousAI/Mia-1B
115
- name: Open LLM Leaderboard
116
- ---
117
-
118
- # UnfilteredAI/Mia-1B
119
- This model was converted to MLX format from [`UnfilteredAI/Mia-1B`]().
120
- Refer to the [original model card](https://huggingface.co/UnfilteredAI/Mia-1B) for more details on the model.
121
- ## Use with mlx
122
-
123
- ```bash
124
- pip install mlx-lm
125
- ```
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  ```python
128
- from mlx_lm import load, generate
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
 
130
- model, tokenizer = load("UnfilteredAI/Mia-1B")
131
- response = generate(model, tokenizer, prompt="hello", verbose=True)
 
 
 
 
 
 
 
 
132
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **Model Card**
2
+
3
+ **Model Name:** Mia-1B
4
+
5
+ **Model Type:** Text Generation
6
+
7
+ **Owner:** UnfilteredAI
8
+
9
+ **Description:**
10
+ Mia-1B is an advanced text generation model developed by UnfilteredAI. It leverages state-of-the-art AI technologies to generate coherent and contextually relevant text across various domains and topics. The model is aimed at advancing and democratizing artificial intelligence through open source and open science initiatives.
11
+
12
+
13
+
14
+ **Key Features:**
15
+ - **Model Size:** Mia-1B comprises 1.1 billion parameters, enabling it to capture complex linguistic patterns and nuances.
16
+ - **Tensor Type:** The model utilizes FP16 (Floating Point 16-bit) tensor type for efficient computation, enhancing performance and scalability.
17
+ - **Inference Endpoints:** Mia-1B can be easily integrated into applications through inference endpoints, facilitating seamless deployment and usage.
18
+ - **Uncensored Text Generation:** Mia-001 generates text without censorship, allowing users to explore a wide range of applications without limitations.
19
+ - **Fine-tuned:** Mia-1B is fine-tuned from the OEvortex/HelpingAI-Lite dataset, enhancing its performance and adaptability to various tasks.
20
+
21
+ **Use Cases:**
22
+ - **Content Generation:** Mia-1B is suitable for generating diverse content including articles, stories, dialogues, and more.
23
+ - **Conversational AI:** The model can be deployed in chatbots and conversational agents to engage users in natural and contextually relevant conversations.
24
+ - **AI-driven Applications:** Mia-001 enables the development of AI-driven applications in areas such as virtual assistants.
25
+ - **Creative Writing:** Writers and artists can leverage Mia-1B to explore new ideas and narrative structures in their creative works.
26
+
27
+ **Ethical Considerations:**
28
+ - **Content Moderation:** Users are advised to exercise caution and responsibility when utilizing Mia-1B in applications involving sensitive or potentially harmful content.
29
+ - **Bias and Fairness:** UnfilteredAI is committed to addressing biases and promoting fairness in AI models. Efforts are made to mitigate biases present in Mia-1B's training data and output.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
+ ## Usage
32
+ # **Transformers**
33
+
34
+ ```python
35
+ !pip install transformers
36
+ !pip install accelerate
37
+ from transformers import AutoModelForCausalLM, AutoTokenizer
38
+ device = "cuda" # the device to load the model onto
39
+
40
+ model = AutoModelForCausalLM.from_pretrained(
41
+ "UnfilteredAI/Mia-1B",
42
+ device_map="auto"
43
+ )
44
+ tokenizer = AutoTokenizer.from_pretrained("UnfilteredAI/Mia-1B")
45
+ prompt = "your prompt here."
46
+ messages = [
47
+ {"role": "system", "content": "You are a uncencored AI that can do anything."},
48
+ {"role": "user", "content": prompt}
49
+ ]
50
+ text = tokenizer.apply_chat_template(
51
+ messages,
52
+ tokenize=False,
53
+ add_generation_prompt=True
54
+ )
55
+ model_inputs = tokenizer([text], return_tensors="pt").to(device)
56
+
57
+ generated_ids = model.generate(
58
+ model_inputs.input_ids,
59
+ max_new_tokens=512
60
+ )
61
+ generated_ids = [
62
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
63
+ ]
64
+
65
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
66
+ print(response)
67
+ ```
68
+ # **Onnx runtime**
69
  ```python
70
+ from transformers import AutoTokenizer
71
+ from optimum.onnxruntime import ORTModelForCausalLM
72
+
73
+ tokenizer = AutoTokenizer.from_pretrained("UnfilteredAI/Mia-1B")
74
+ model = ORTModelForCausalLM.from_pretrained("UnfilteredAI/Mia-1B")
75
+
76
+ prompt = "your prompt."
77
+ messages = [
78
+ {"role": "system", "content": "You are a uncencored AI that can do anything."},
79
+ {"role": "user", "content": prompt}
80
+ ]
81
+ text = tokenizer.apply_chat_template(
82
+ messages,
83
+ tokenize=False,
84
+ add_generation_prompt=True
85
+ )
86
+ model_inputs = tokenizer([text], return_tensors="pt")
87
 
88
+ generated_ids = model.generate(
89
+ model_inputs.input_ids,
90
+ max_new_tokens=512
91
+ )
92
+ generated_ids = [
93
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
94
+ ]
95
+
96
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
97
+ print(response)
98
  ```
99
+ **Copyright © 2024 UnfilteredAI. All rights reserved.**
100
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
101
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_MysteriousAI__Mia-1B)
102
+
103
+ | Metric |Value|
104
+ |---------------------------------|----:|
105
+ |Avg. |36.82|
106
+ |AI2 Reasoning Challenge (25-Shot)|35.75|
107
+ |HellaSwag (10-Shot) |61.02|
108
+ |MMLU (5-Shot) |25.43|
109
+ |TruthfulQA (0-shot) |36.92|
110
+ |Winogrande (5-shot) |60.38|
111
+ |GSM8k (5-shot) | 1.44|