File size: 2,077 Bytes
a66a0aa
 
f95843f
 
316e6fa
 
f95843f
 
 
 
 
a66a0aa
467329d
 
1d88e5e
467329d
 
 
ebda94d
467329d
 
 
 
 
1d88e5e
467329d
 
 
 
1d88e5e
467329d
 
 
 
 
 
 
1d88e5e
467329d
 
 
 
 
 
 
 
f95843f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
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]
* may produce unaccurate results in translation
* https://www.diogenial.com https://rd-mediation.com
* Framework MLX Apple Silicon [4]

## Example
<code>La traduction de Φασὶ δὲ καὶ Ἀλέξανδρον εἰπεῖν ὡς εἴπερ Ἀλέξανδρος μὴ ἐγεγόνει, ἐθελῆσαι ἂν Διογένης γενέσθαι est:
Diogène dit que si Alexandre avait été moins ambitieux, il aurait bien voulu être Diogène.</code>
(imprécise: On assure qu’Alexandre disait que s’il n’était pas Alexandre il voudrait être Diogène. selon [5])

## Use
<code>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)</code>


## 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