Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- erfanzar/UltraChat-Mixin
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
- fr
|
7 |
+
- es
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
pipeline_tag: text-generation
|
11 |
+
tags:
|
12 |
+
- code
|
13 |
+
---
|
14 |
+
|
15 |
+
# LinguaMatic
|
16 |
+
|
17 |
+
LinguaMatic is an advanced AI model designed to handle a wide range of Natural Language Processing (NLP) tasks. With its powerful capabilities, LinguaMatic can assist with tasks such as text classification, sentiment analysis, language translation, question answering, and much more.
|
18 |
+
|
19 |
+
## EasyDel
|
20 |
+
|
21 |
+
The model is finetuned Using a custom version of UltraChat on TPU-v4 POD using [EasyDel](https://github.com/erfanzar/EasyDeL)
|
22 |
+
|
23 |
+
## Prompting Method
|
24 |
+
|
25 |
+
LinguaMatic utilizes the OC prompting method to generate responses. This method, named after the friendly and intelligent llama, enhances the model's ability to engage in meaningful conversations. The `prompt_model` function provided below demonstrates how the llama2 prompting method is implemented:
|
26 |
+
|
27 |
+
```python
|
28 |
+
def os_chat_template(
|
29 |
+
message: str,
|
30 |
+
chat_history: Optional[List[str] | List[List[str]]] = None,
|
31 |
+
system_prompt: Optional[str] = None
|
32 |
+
):
|
33 |
+
if chat_history is None:
|
34 |
+
chat_history = []
|
35 |
+
system = f"<|system|>\n{system_prompt}</s>" if system_prompt is not None else ""
|
36 |
+
ua = ""
|
37 |
+
for user_input, response in chat_history:
|
38 |
+
ua += f"<|user|>\n{user_input}</s>\n" + f"<|assistant|>\n{response}</s>\n"
|
39 |
+
return system + ua + f"<|user|>\n{message}</s>\n<|assistant|>\n"
|
40 |
+
```
|
41 |
+
|
42 |
+
The `prompt_model` function takes a `message` as input, along with the `chat_history` and `system_prompt`. It generates a formatted text that includes the system prompt, user inputs, and the current message. This approach allows LinguaMatic to maintain context and provide more coherent and context-aware responses.
|
43 |
+
|
44 |
+
|
45 |
+
## Contributing
|
46 |
+
|
47 |
+
We welcome contributions to enhance LinguaMatic's capabilities and improve its performance. If you encounter any issues or have suggestions for improvement, please feel free to submit a pull request or open an issue on [EasyDel](https://github.com/erfanzar/EasyDeL) GitHub repository.
|