cenkersisman commited on
Commit
2ebb251
1 Parent(s): 550f0d5

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +135 -0
README.md ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Model Card for peft with cenkersisman/TurkishWikipedia-LLM-7b-base
2
+
3
+ **Library name:** peft
4
+
5
+ **Base model:** mistralai/Mistral-7B-v0.1
6
+
7
+ **Model Description:**
8
+
9
+ This model was fine-tuned on Turkish Wikipedia texts using the peft library with Lora configuration.
10
+
11
+ **Developed by:** [More Information Needed]
12
+
13
+ **Funded by:** [Optional]: [More Information Needed]
14
+
15
+ **Shared by:** [Optional]: [More Information Needed]
16
+
17
+ **Model type:** Fine-tuned language model
18
+
19
+ **Language(s) (NLP):** Turkish
20
+
21
+ **License:** [More Information Needed]
22
+
23
+ **Finetuned from model:** mistralai/Mistral-7B-v0.1
24
+
25
+ **Model Sources:**
26
+
27
+ - **Repository:** [More Information Needed]
28
+ - **Paper:** [Optional]: [More Information Needed]
29
+ - **Demo:** [Optional]: [To be implemented]
30
+
31
+ ## Uses
32
+
33
+ **Direct Use**
34
+
35
+ This model can be used for various NLP tasks, including:
36
+
37
+ - Text generation
38
+ - Machine translation
39
+ - Question answering
40
+ - Text summarization
41
+
42
+ **Downstream Use**
43
+
44
+ [More Information Needed]
45
+
46
+ ## Bias, Risks, and Limitations
47
+
48
+ - **Bias:** The model may inherit biases from the training data, which is Wikipedia text. Biases could include cultural biases or biases in how information is presented on Wikipedia.
49
+ - **Risks:** The model may generate text that is offensive, misleading, or factually incorrect. It is important to be aware of these risks and to use the model responsibly.
50
+ - **Limitations:** The model may not perform well on all tasks, and it may not be able to generate text that is creative or original.
51
+
52
+ ## Recommendations
53
+
54
+ - Users (both direct and downstream) should be aware of the risks, biases and limitations of the model.
55
+ - It is important to evaluate the outputs of the model carefully before using them in any application.
56
+
57
+ ## How to Get Started with the Model
58
+
59
+ The following code snippet demonstrates how to load the fine-tuned model and generate text:
60
+
61
+ Python
62
+
63
+ ```
64
+ from transformers import AutoModelForCausalLM, LlamaTokenizer, pipeline
65
+
66
+ # Load the model and tokenizer
67
+ folder = "cenkersisman/TurkishWikipedia-LLM-7b-base"
68
+ device = "cuda"
69
+ model = AutoModelForCausalLM.from_pretrained(folder).to(device)
70
+ tokenizer = LlamaTokenizer.from_pretrained(folder)
71
+
72
+ # Create a pipeline for text generation
73
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device_map=device, max_new_tokens=128, return_full_text=True, repetition_penalty=1.1)
74
+
75
+ # Generate text
76
+ def generate_output(user_query):
77
+ outputs = pipe(user_query, do_sample=True, temperature=0.1, top_k=10, top_p=0.9)
78
+ return outputs[0]["generated_text"]
79
+
80
+ # Example usage
81
+ user_query = "brezilya'nın nüfus olarak dünyanın en büyük"
82
+ output = generate_output(user_query)
83
+ print(output)
84
+ ```
85
+
86
+ This code will load the fine-tuned model from the "cenkersisman/TurkishWikipedia-LLM-7b-base", create a pipeline for text generation, and then generate text based on the provided user query.
87
+
88
+ ## Training Details
89
+
90
+ **Training Data**
91
+
92
+ - 9 million sentences from Turkish Wikipedia.
93
+
94
+ **Training Procedure**
95
+
96
+ - **Preprocessing:** The data was preprocessed by tokenizing the text and adding special tokens.
97
+
98
+ - **Training Hyperparameters**
99
+
100
+ - Training regime: Fine-tuning with Lora configuration
101
+ - Speeds, Sizes, Times: [More Information Needed]
102
+
103
+ **Evaluation**
104
+
105
+ - Testing Data, Factors & Metrics: [More Information Needed]
106
+
107
+ - **Results:** [More Information Needed]
108
+
109
+
110
+ ## Summary
111
+
112
+ - This model is a fine-tuned version of mistralai/Mistral-7B-v0.1 trained on Turkish Wikipedia text.
113
+ - The model can be used for various NLP tasks, including text generation.
114
+ - It is important to be aware of the risks, biases, and limitations of the model before using it.
115
+
116
+ ## Environmental Impact
117
+
118
+ - The environmental impact of training this model can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
119
+
120
+ - Hardware Type: [More Information Needed]
121
+
122
+ - Hours used: [More Information Needed]
123
+
124
+ - Cloud Provider: [More Information Needed]
125
+
126
+ - Compute Region: [More Information Needed]
127
+
128
+ - Carbon Emitted: [More Information Needed]
129
+
130
+
131
+ ## Technical Specifications
132
+
133
+ - **Model Architecture and Objective:**
134
+ - The model architecture is based on mistralai/Mistral-7B-v0.1.
135
+ - The objective of the fine-tuning process was to improve the model's