DiogenialRAG / README.md
Luc18's picture
Update README.md
c92ff8b verified
---
license: mit
tags:
- mlx
- mistral-7b
- Ancient greek
language:
- fr
- el
library_name: mlx
pipeline_tag: text-generation
---
<img src="https://l0d0v1c.github.io/notes/medias/greeks.jpg"/>
# An Ancient Greek/French Model for RAG
* based on mistralai/Mistral-7B-v0.1
* Trained on [1] (and automated translation by GTP4) and [2]
* For RAG [3]
* Focused on French / Ancient Greek relationship
* may produce unaccurate results in translation
* https://www.diogenial.com https://rd-mediation.com
* Framework MLX Apple Silicon [4]
## Example
### Exemple dans le corpus
```
La traduction de
Φασὶ δὲ καὶ Ἀλέξανδρον εἰπεῖν ὡς εἴπερ Ἀλέξανδρος μὴ ἐγεγόνει, ἐθελῆσαι ἂν Διογένης γενέσθαι
est:
Diogène dit que si Alexandre avait été moins ambitieux, il aurait bien voulu être Diogène.
```
(imprécise: On assure qu’Alexandre disait que s’il n’était pas Alexandre il voudrait être Diogène. selon [5])
### Exemple hors corpus
```
La traduction de Γνῶθι σεαυτόν est Connais-toi toi-même.
```
### Exemple de thème hors corpus
```
La traduction de la phrase: J'aime les machines en grec ancien est εἰμὶ δ' ἀγαπῶ τὰ μηχανήματα.
```
Ce qui signifie plus exactement "Je suis et j'aime les machines"
## Use
```
from mlx_lm import load, generate
model, tokenizer = load("RANDMEDIATION/DiogenialRAG")
response = generate(model, tokenizer, prompt=input("prompt:"), verbose=True,max_tokens=256,temp=0.8)
```
## References
[1] Giannantoni, Gabriele, éd. Socratis et Socraticorum reliquiae. Elenchos 18. Book V. Naples, Italy: Bibliopolis, 1990.
[2] https://tatoeba.org/fr/sentences/show_all_in/grc/none
[3] Lewis, Patrick, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, et al. « Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks ». In Advances in Neural Information Processing Systems, édité par H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, et H. Lin, 33:9459‑74. Curran Associates, Inc., 2020. https://proceedings.neurips.cc/paper_files/paper/2020/file/6b493230205f780e1bc26945df7481e5-Paper.pdf.
[4] Hannun, Awni, Jagrit Digani, Angelos Katharopoulos, et Ronan Collobert. « MLX: Efficient and flexible machine learning on Apple silicon », 2023. https://github.com/ml-explore.
[5] https://remacle.org/bloodwolf/philosophes/laerce/6diogene1.htm