ceadar-ie commited on
Commit
caa5124
1 Parent(s): d0ac20f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +197 -0
README.md CHANGED
@@ -1,3 +1,200 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ datasets:
5
+ - AIVision360
6
+ tags:
7
+ - summarization
8
+ - classification
9
+ - translation
10
+ - NLP
11
+ - media and journalism
12
+ - domain specific llm
13
  license: apache-2.0
14
+ pipeline_tag: text-generation
15
  ---
16
+
17
+ # Llama2-13B-AIVision360
18
+
19
+ Llama2-13B-AIVision360 is a state-of-the-art, open-source chat model that stands as a beacon for technology, media, and AI news discussions. Built on the robust Llama2-13B architecture, this model has been enhanced and refined utilizing the AIVision360-8k dataset, making it a pioneer in the domain of AI news generation and interpretation.
20
+
21
+ ## Model Details
22
+
23
+ - Architecture: Llama2-13B
24
+ - Training Dataset: [AIVision360-8k](https://huggingface.co/datasets/ceadar-ie/AIVision360-8k)
25
+
26
+ ## Dataset Utilized: AIVision360-8k
27
+
28
+ Drawing strength from the AIVision360-8k dataset, a curated collection hailing from "ainewshub.ie", this model is tailor-made for technology media and journalism. Offering structured interactions related to AI news, it captures the essence of the latest AI trends and evolutions. For a deeper dive into the dataset visit: [AIVision360-8k](https://huggingface.co/datasets/ceadar-ie/AIVision360-8k)
29
+
30
+ ### Model Specification
31
+
32
+ - **Developed by:** CeADAR Connect Group
33
+ - **Model type:** Large Language Model
34
+ - **Language(s):** en
35
+ - **Finetuned from model:** Llama2-13B
36
+
37
+ ## Key Features and Functionalities
38
+
39
+ ### Domain Specialization
40
+ The Llama2-13B-AIVision360 model is specialized in AI news, serving as a resource for AI researchers, enthusiasts, and media experts.
41
+ ### Model API Accessibility
42
+ Offers a straightforward Python integration for generating AI news insights.
43
+ ### Performance Optimisation
44
+ Efficient performance across both CPU and GPU platforms.
45
+ ### Data Representation
46
+ Utilises a comprehensive AI news dataset, enabling content generation akin to professional journalism standards.
47
+
48
+ ## Model Usage
49
+
50
+ Experience the capabilities of the Llama2-13B-AIVision360 model through a well-structured Python interface. To kick-start your exploration, follow the steps and snippets given below:
51
+
52
+ ## Prerequisites
53
+ ### 1. Ensure required packages are available
54
+
55
+ ```python
56
+ import torch
57
+ import transformers
58
+ from typing import Any, Dict
59
+ from transformers import PreTrainedTokenizerFast, AutoTokenizer,
60
+ AutoModelForCausalLM
61
+ from transformers import (
62
+ AutoModelForCausalLM,
63
+ AutoTokenizer,
64
+ BitsAndBytesConfig,
65
+ HfArgumentParser,
66
+ TrainingArguments,
67
+ pipeline,
68
+ logging,
69
+ )
70
+ import time
71
+ ```
72
+
73
+ ### 2. Initiate the model and tokenizer
74
+
75
+ ```python
76
+ model_name = "ceadar-ie/Llama2-13B-AIVision360"
77
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
78
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto",
79
+ torch_dtype=torch.float16, trust_remote_code=True)
80
+ ```
81
+
82
+ ### 3. Create a function for generating text
83
+
84
+ ```python
85
+ def generate_text(input_text):
86
+ num_words_input = len(input_text.split())
87
+
88
+ start_time = time.time()
89
+
90
+ pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=500,temperature=1, top_k=10, top_p=0.1, repetition_penalty = 1.15)
91
+ prompt = f" [INST] {input_text} [/INST]"
92
+ result = pipe(prompt)
93
+ generated_text = result[0]['generated_text'].replace(prompt, "").strip()
94
+
95
+ end_time = time.time()
96
+ time_taken = end_time - start_time
97
+
98
+ num_words_generated = len(generated_text.split())
99
+
100
+ print("Generated Output:")
101
+ print(generated_text)
102
+ print('=' * 60 )
103
+ print("\nNumber of Words in Input Text:", num_words_input)
104
+ print("Number of Words in Generated Output:", num_words_generated)
105
+ print("Time Taken to Generate Output: {:.2f} seconds".format(time_taken))
106
+ ```
107
+
108
+ ## Example Evaluation and Use
109
+
110
+ ### Example Prompt 1:
111
+ List new regulations or guidelines that have been introduced globally concerning AI ethics and bias mitigation.
112
+
113
+ ### Generated Output:
114
+ Globally, there is a growing concern about the potential negative impacts of artificial intelligence (AI) on society, particularly with regards to ethics and bias. In response, regulators and policymakers have been introducing new guidelines and regulations to address these issues. Some examples of the new regulations and guidelines introduced globally concerning AI ethics and bias mitigation include:
115
+
116
+ - The European Union's General Data Protection Regulation (GDPR) and the EU AI Act, which aim to ensure transparency and accountability in the use of AI technology.
117
+ - The US Federal Trade Commission's (FTC) policy statement on commercial use of AI, which highlights the need for companies to avoid deceptive practices and discrimination when using AI.
118
+ - Australia's review into the use of facial recognition technology, which has led to a temporary ban on the use of this technology in the country.
119
+ - Britain's proposed AI Code, which will provide guidance on the use of trustworthy AI systems and promote principles such as safety, robustness, privacy, and fairness.
120
+ - India's consultation paper on ethics and governance of AI, which outlines principles such as transparency, accountability, democracy, and inclusion.
121
+
122
+ These new regulations and guidelines demonstrate a growing trend towards the regulation of AI and the importance of addressing ethical and bias issues in the development and use of AI technology.
123
+
124
+
125
+ ### Example Prompt 2:
126
+ List What are the current market trends in the AI industry?
127
+
128
+ ### Generated Output:
129
+ The text provides an overview of the current state of the AI industry, including the performance of various companies and technologies in the sector. The trends listed include the success of Nvidia's H100 GPU, the growing demand for AI chips, and the competition among major tech companies to dominate the AI market. These trends highlight the rapid growth and increasing importance of the AI industry, with a focus on the competitive landscape and the demand for high-performance computing resources. The current market trends in the AI industry include Nvidia's dominance of the H100 GPU, the growing demand for AI chips, and the competition among major tech companies such as Intel, Google, and Microsoft to dominate the AI market. 85% of H100 GPUs sold since January have been used for AI tasks, there is a shortage of AI chips, and the market for programmable AI chips is expected to reach $30 billion by 2025. Additionally, major tech companies are investing heavily in AI research and development, and the market for AI chips is becoming increasingly competitive.
130
+
131
+ ### Example Prompt 3:
132
+ Concisely list in separate points, any recent controversies or debates in the AI community.
133
+
134
+ ### Generated Output:
135
+ Recent controversies and debates in the AI community include:
136
+
137
+ - The release of a chatbot called Bard by Google, which promptly spread false information about NASA's moon mission
138
+ - OpenAI CEO Sam Altman tweeted that Bard had been tested for months, but later clarified that only select employees were involved in testing
139
+ - Microsoft has partnered with OpenAI to integrate GPT-4 into its products, including Bing and Edge browser, but there have been reports of unsolicited calls and payments mistakenly charged to customers using these products
140
+ - Meta Platforms' Oversight Board received more funding, but found out through social media like everyone else when CEO Mark Zuckerberg announced the change
141
+ - There have been calls for greater transparency from Meta after it failed to inform the board of the AI hiring freeze and layoffs affecting AI teams
142
+
143
+
144
+ ### Example Prompt 4:
145
+ Concisely list in separate points, sectors or industries that are seeing the most rapid AI adoption right now. Do not repeat provided information.
146
+
147
+ ### Generated Output:
148
+ Sectors and industries are rapidly incorporating AI into their processes to improve efficiency and decision-making, according to a report by Forrester Research. The report highlights the urgent need for organizations to adopt AI to remain competitive and agile in the face of changing market conditions and customer demands. Here are the details about the report and its findings:
149
+
150
+ - The report by Forrester Research highlights the growing importance of AI adoption in various sectors and industries.
151
+ - The report provides insights into the current state of AI adoption and the potential for future growth.
152
+ - The sectors and industries that are seen the most rapid AI adoption right now include finance, healthcare, retail, and manufacturing.
153
+ - Organizations that adopt AI are able to improve efficiency, make better decisions, and gain a competitive advantage.
154
+ - The report also highlights the challenges and barriers to AI adoption, such as data quality issues and lack of expertise.
155
+
156
+ Here are the sectors or industries that are seeing the most rapid AI adoption right now, based on the report by Forrester Research:
157
+
158
+ 1. Finance
159
+ 2. Healthcare
160
+ 3. Retail
161
+ 4. Manufacturing
162
+
163
+ ## Training Details
164
+
165
+ ### Training Hyperparameters
166
+ - per_device_train_batch_size = 6
167
+ - gradient_accumulation_steps = 4
168
+ - optim = "paged_adamw_32bit"
169
+ - warmup_steps = 100
170
+ - learning_rate = 2e-4
171
+ - max_grad_norm = 0.3
172
+ - warmup_ratio = 0.03
173
+
174
+ ## Model Limitations
175
+ Potential Biases: With its fine-tuning centered on AI news sources, inherent biases from these sources may reflect in the model's outputs.
176
+
177
+ ## Licensing
178
+ The Llama2-13B-AIVision360 model, developed in collaboration with CeADAR Connect Group, combines the licensing frameworks of both Llama2 and AIVision360. Under Meta's terms, users are granted a non-exclusive, worldwide, non-transferable, royalty-free limited license for the use and modification of Llama Materials, inclusive of the Llama2 model and its associated documentation. When redistributing, the provided Agreement and a specific attribution notice must be included. In alignment with the AIVision360 dataset's licensing, the model is also distributed under the Apache 2.0 open-source license, promoting its use and modification within the AI community, while ensuring content reliability sourced from established AI news publishers.
179
+
180
+ ## Out-of-Scope Use
181
+ Llama2-13B-AIVision360 is specifically tailored for AI news discussions. It is not optimized for:
182
+
183
+ - General, non-AI-related conversations.
184
+ - Domain-specific tasks outside AI news.
185
+ - Direct interfacing with physical devices or applications.
186
+
187
+
188
+ ## Bias, Risks, and Limitations
189
+ - Dataset Biases: The AIVision360-8k dataset may contain inherent biases that influence the model's outputs.
190
+ - Over-reliance: The model is an aid, not a replacement for human expertise. Decisions should be made with careful consideration.
191
+ - Content Understanding: The model lacks human-like understanding and cannot judge the veracity of news.
192
+ - Language Limitations: The model's primary language is English. Performance may decrease with other languages.
193
+ - Knowledge Cut-off: The model may not be aware of events or trends post its last training update.
194
+
195
+ ## Citation:
196
+ ```
197
+
198
+ ```
199
+ ## Contact:
200
+ For any further inquiries or feedback concerning Llama2-13B-AIVision360, please forward your communications to [email protected]