Commit
•
913a760
1
Parent(s):
418a8aa
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Quantization made by Richard Erkhov.
|
2 |
+
|
3 |
+
[Github](https://github.com/RichardErkhov)
|
4 |
+
|
5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
6 |
+
|
7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
8 |
+
|
9 |
+
|
10 |
+
Pythia-70m-Synonym-Sentence-Converter - GGUF
|
11 |
+
- Model creator: https://huggingface.co/Mxode/
|
12 |
+
- Original model: https://huggingface.co/Mxode/Pythia-70m-Synonym-Sentence-Converter/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q2_K.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q2_K.gguf) | Q2_K | 0.04GB |
|
18 |
+
| [Pythia-70m-Synonym-Sentence-Converter.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.IQ3_XS.gguf) | IQ3_XS | 0.04GB |
|
19 |
+
| [Pythia-70m-Synonym-Sentence-Converter.IQ3_S.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.IQ3_S.gguf) | IQ3_S | 0.04GB |
|
20 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q3_K_S.gguf) | Q3_K_S | 0.04GB |
|
21 |
+
| [Pythia-70m-Synonym-Sentence-Converter.IQ3_M.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.IQ3_M.gguf) | IQ3_M | 0.04GB |
|
22 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q3_K.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q3_K.gguf) | Q3_K | 0.04GB |
|
23 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q3_K_M.gguf) | Q3_K_M | 0.04GB |
|
24 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q3_K_L.gguf) | Q3_K_L | 0.04GB |
|
25 |
+
| [Pythia-70m-Synonym-Sentence-Converter.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.IQ4_XS.gguf) | IQ4_XS | 0.04GB |
|
26 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q4_0.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q4_0.gguf) | Q4_0 | 0.04GB |
|
27 |
+
| [Pythia-70m-Synonym-Sentence-Converter.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.IQ4_NL.gguf) | IQ4_NL | 0.04GB |
|
28 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q4_K_S.gguf) | Q4_K_S | 0.04GB |
|
29 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q4_K.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q4_K.gguf) | Q4_K | 0.05GB |
|
30 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q4_K_M.gguf) | Q4_K_M | 0.05GB |
|
31 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q4_1.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q4_1.gguf) | Q4_1 | 0.05GB |
|
32 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q5_0.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q5_0.gguf) | Q5_0 | 0.05GB |
|
33 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q5_K_S.gguf) | Q5_K_S | 0.05GB |
|
34 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q5_K.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q5_K.gguf) | Q5_K | 0.05GB |
|
35 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q5_K_M.gguf) | Q5_K_M | 0.05GB |
|
36 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q5_1.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q5_1.gguf) | Q5_1 | 0.05GB |
|
37 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q6_K.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q6_K.gguf) | Q6_K | 0.06GB |
|
38 |
+
| [Pythia-70m-Synonym-Sentence-Converter.Q8_0.gguf](https://huggingface.co/RichardErkhov/Mxode_-_Pythia-70m-Synonym-Sentence-Converter-gguf/blob/main/Pythia-70m-Synonym-Sentence-Converter.Q8_0.gguf) | Q8_0 | 0.07GB |
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
Original model description:
|
44 |
+
---
|
45 |
+
license: apache-2.0
|
46 |
+
language:
|
47 |
+
- en
|
48 |
+
tags:
|
49 |
+
- tiny
|
50 |
+
- small
|
51 |
+
- synonym
|
52 |
+
- tool
|
53 |
+
- converter
|
54 |
+
---
|
55 |
+
## What's this?
|
56 |
+
|
57 |
+
A **tiny** model that can perform **paraphrasing** or **synonym substitution**.
|
58 |
+
|
59 |
+
The base model is [pythia-70m](https://huggingface.co/EleutherAI/pythia-70m). This model was fine-tuned with 10 epochs using [Q-Lora](https://github.com/artidoro/qlora) method on my own training set.
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
## How to use
|
64 |
+
|
65 |
+
### quick start
|
66 |
+
|
67 |
+
First import the model from hf:
|
68 |
+
|
69 |
+
```python
|
70 |
+
from transformers import GPTNeoXForCausalLM, AutoTokenizer
|
71 |
+
|
72 |
+
|
73 |
+
model_name_or_path = 'Mxode/Pythia-70m-C-Language-KnowledgeExtract'
|
74 |
+
device = 'cuda'
|
75 |
+
|
76 |
+
model = GPTNeoXForCausalLM.from_pretrained(model_name_or_path).to(device)
|
77 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
|
78 |
+
|
79 |
+
# prompt template
|
80 |
+
prompt = '<|prompt|>Convert the following passage into synonymous sentences.<|prompt|>\n'
|
81 |
+
# any text you wish to convert, preferably in complete single sentences.
|
82 |
+
content = 'The theories and methods of systems science are extensively employed in various domains, including biology, economics, and sociology.'
|
83 |
+
|
84 |
+
text = prompt + content
|
85 |
+
```
|
86 |
+
|
87 |
+
Then generate:
|
88 |
+
|
89 |
+
```python
|
90 |
+
inputs = tokenizer(text, return_tensors="pt").to(device)
|
91 |
+
input_ids = inputs.input_ids
|
92 |
+
|
93 |
+
tokens = model.generate(
|
94 |
+
**inputs,
|
95 |
+
pad_token_id=tokenizer.eos_token_id,
|
96 |
+
max_new_tokens=100,
|
97 |
+
do_sample=True,
|
98 |
+
)
|
99 |
+
# strip the input
|
100 |
+
response = tokenizer.decode(tokens[0]).replace(text, "").strip('<|endoftext|>')
|
101 |
+
|
102 |
+
# I call it 'Synonymizer' :)
|
103 |
+
print(f'Synonymizer: {response}')
|
104 |
+
### output:
|
105 |
+
### The disciplines of systems science are extensively employed in various domains, including biology, economics, and sociology.
|
106 |
+
```
|
107 |
+
|
108 |
+
Or maybe we'll try some more impossibly trained news? Hmm, get some sports news from espn and try:
|
109 |
+
|
110 |
+
```python
|
111 |
+
### ...
|
112 |
+
content = 'As both teams exited the court for halftime, Baynes and Mayen were shoulder to shoulder.'
|
113 |
+
|
114 |
+
### ...
|
115 |
+
print(f'Synonymizer: {response}')
|
116 |
+
### output:
|
117 |
+
### As the team neets around the court to ease their shifts, Baynes and Middets were partnerly paryyneen.
|
118 |
+
|
119 |
+
### sometimes:
|
120 |
+
### Begantly mastitatively, Baynes and Mayen staged their team rested the Tywindes rested the Tywindes rested the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid the Tywindes laid
|
121 |
+
```
|
122 |
+
|
123 |
+
WELL, as you can see, this is after all only an **experimental tiny model** and with that in mind I can give it a 7.5 out of 10 for performance.
|
124 |
+
|
125 |
+
I didn't adjust the hyperparameters, could try [low temperature] + [a bit higher repetition_penalty], the performance might be better.
|
126 |
+
|
127 |
+
I'll follow up by training more data on a slightly larger model and hopefully supporting multiple languages. While we all know that bigger models have better generalization capabilities - but smaller models are really cool :)
|
128 |
+
|
129 |
+
|
130 |
+
|