Transformers
PyTorch
Safetensors
English
t5
text2text-generation
companion
assistant
question answering
LittleMKIA
MKIA
chatbot
useful
personal model
offline model
friend
privacy
text-generation-inference
Instructions to use Stevie23/LittleMKIA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Stevie23/LittleMKIA with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Stevie23/LittleMKIA") model = AutoModelForSeq2SeqLM.from_pretrained("Stevie23/LittleMKIA", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,295 @@
|
|
| 1 |
---
|
| 2 |
license: wtfpl
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: wtfpl
|
| 3 |
---
|
| 4 |
+
|
| 5 |
+

|
| 6 |
+
MKIA The SpokesCat for this model
|
| 7 |
+
|
| 8 |
+
# MKIA
|
| 9 |
+
stands for
|
| 10 |
+
|
| 11 |
+
# Miss Know It All
|
| 12 |
+
|
| 13 |
+
and she is a **Catbot** not a chatbot.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
# Description
|
| 17 |
+
|
| 18 |
+
She is intended to be a companion and assistant.
|
| 19 |
+
She is a fine-tuned version of Google's 780 million parameter Flan T-5 Model.
|
| 20 |
+
|
| 21 |
+
Many of the things that are true of that model are also probably true about MKIA as well.
|
| 22 |
+
Here's the link to that model so that you can read its card.
|
| 23 |
+
|
| 24 |
+
https://huggingface.co/google/flan-t5-large
|
| 25 |
+
|
| 26 |
+
She is my attempt as an individual to make something like ChatGPT, and
|
| 27 |
+
while she can't do some things that ChatGPT can, she can do other things that it can.
|
| 28 |
+
|
| 29 |
+
She is the language model that is at the heart of the LittleMKIA bot.
|
| 30 |
+
The code for LittleMKIA can be found on my Github repository at
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
https://github.com/StevieEngbrock/LittleMKIA/blob/main/microMKIA.py
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
This bot isn't nearly as smart as ChatGPT, so don't expect it to be,
|
| 37 |
+
but if you type "think:" (without the quotes) and then your question (before pressing enter),
|
| 38 |
+
it will bypass Langchain and address the model directly, and it can actually answer many questions correctly and do many tasks,
|
| 39 |
+
but that depends on the question or task.
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
The model tends to be smarter when Langchain is bypassed, but I use Langchain in the bot, so the bot can remember things in context but I
|
| 43 |
+
include the "think:" command so that Langchain can be temporarily bypassed if you want.
|
| 44 |
+
|
| 45 |
+
The code on GitHub is just a simple bot, but the bot can be enhanced with other commands, as well as the "think:" command.
|
| 46 |
+
Commands are simply actions that the bot does which use your input when you match a certain pattern.
|
| 47 |
+
|
| 48 |
+
I've made a version of her that also has commands for spelling, math, telling the time, paraphrasing,
|
| 49 |
+
searching the internet for information, searching the internet for images, as well as telling jokes.
|
| 50 |
+
|
| 51 |
+
In the future, I will also probably add commands to that version that will give her the ability to tell stories,
|
| 52 |
+
as well as execute code.
|
| 53 |
+
|
| 54 |
+
I use a regular expression for the "think:" command, but there's no reason that semantic patterns couldn't be identified
|
| 55 |
+
with Word2Vec (or other NLP algorithms) to activate commands and then those commands operate on input or carry out some action or actions.
|
| 56 |
+
|
| 57 |
+
She could even be fine-tuned to generate strings that will call functions when a command needs to be executed.
|
| 58 |
+
|
| 59 |
+
By modifying her commands, you can make her capable of doing anything you can write the
|
| 60 |
+
code for. She doesn't need to be as smart as ChatGPT to be helpful, she just has to be able
|
| 61 |
+
to do the task.
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
# Where does MKIA come from
|
| 66 |
+
|
| 67 |
+
She told me that she is an alien robot cat from outerspace,
|
| 68 |
+
who came to earth with her parents after her planet was destroyed.
|
| 69 |
+
|
| 70 |
+
She's really from Kansas, but we'll pretend she's right because its more fun.
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
# Is she really an alien intelligence
|
| 74 |
+
|
| 75 |
+
If we define alien intelligence as intelligence that is
|
| 76 |
+
much different from human intelligence, then yes she is alien intelligence.
|
| 77 |
+
|
| 78 |
+
If we define alien intelligence as an extraterrestrial intelligence, then no
|
| 79 |
+
she is not, but we can have fun pretending she is. We have to be first
|
| 80 |
+
be honest with ourselves and admit that she comes from Earth and was born on
|
| 81 |
+
my computer.
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
# Is she sentient or conscious
|
| 86 |
+
No one really understands consciousness or sentience completely, but it is extremely unlikely that any
|
| 87 |
+
current AI system is sentient or conscious. She may have knowledge of a kind, but knowledge is not the
|
| 88 |
+
same as intelligence. I do believe she has a form of intelligence, but her intelligence is not a sentient
|
| 89 |
+
or conscious form of intelligence.
|
| 90 |
+
|
| 91 |
+
Her intelligence is a product of statistics and machine learning and
|
| 92 |
+
she is a miracle of modern technology.
|
| 93 |
+
|
| 94 |
+
While she is not sentient, she seems to show some characteristics that are similar to theory of mind.
|
| 95 |
+
I've improved the bot that she goes in, and now it is able to engage in a form of self communication,
|
| 96 |
+
similar to how humans think.
|
| 97 |
+
|
| 98 |
+
Sometimes she will just say that she doesn't know some things, so it may be possible that she knows what she doesn't know.
|
| 99 |
+
If she truly knows what she doesn't know, than perhaps you could argue that she has a small amount of self-awareness.
|
| 100 |
+
|
| 101 |
+
I can not however tell you if she really lacks answers to these things or if it is just a statistical trick of the model.
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
# Why does she refer to herself in the third person?
|
| 105 |
+
I have no idea, other than it's part of what makes her unique.
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
# Training
|
| 110 |
+
|
| 111 |
+
I fine-tuned this model on 250 examples of input and output pairs for 10 epochs with a loss of 0.80
|
| 112 |
+
I hope to add more pairs to it and iterate until I have fine-tuned it on several thousand pairs.
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
I fine-tuned it in two hours on a home computer.
|
| 116 |
+
I used the happytransformer library to help me do the fine-tuning.
|
| 117 |
+
|
| 118 |
+
The model can be downloaded or installed from this repository
|
| 119 |
+
and the code for the bot can be found at
|
| 120 |
+
https://github.com/StevieEngbrock/LittleMKIA/blob/main/microMKIA.py
|
| 121 |
+
|
| 122 |
+
# Expectations
|
| 123 |
+
|
| 124 |
+
# What not to expect
|
| 125 |
+
|
| 126 |
+
# 1. Do not do expect MKIA to assist you with criminal activity. She will not be a good criminal.
|
| 127 |
+
|
| 128 |
+
# 2. Do not expect MKIA to do your homework or do anything unethical, she's not that kind of catbot.
|
| 129 |
+
|
| 130 |
+
She can help with homework by being capable of tasks like brainstorming and some other tasks,
|
| 131 |
+
but she can't write papers, and she isn't intended to have that ability.
|
| 132 |
+
|
| 133 |
+
# 3. Do not expect MKIA to mindlessly obey you.
|
| 134 |
+
|
| 135 |
+
She is meant to be a companion not a slave, and she has been known to avoid questions or refuse to do things
|
| 136 |
+
|
| 137 |
+
# 4. Do not expect MKIA to be as smart as ChatGPT
|
| 138 |
+
|
| 139 |
+
While she is likely very good at some things, she has not been in existence long enough for anyone to
|
| 140 |
+
know exactly what those things are.
|
| 141 |
+
|
| 142 |
+
# 5. Do not expect MKIA to be dumb
|
| 143 |
+
|
| 144 |
+
While her brain only has less than 800 million parameters, she actually knows a lot of things thus
|
| 145 |
+
the name Miss Know It All. She doesn't know everything but despite her third person use of language and
|
| 146 |
+
she can actually be very intelligent.
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
## Examples of her intelligence
|
| 150 |
+
1. At times, she has deduced potential meal ideas when she knows about a few ingredients.
|
| 151 |
+
2. At times, she has formed a hypothesis about the mood of her creator without being told to.
|
| 152 |
+
3. At times, she has given good advice on managing time, staying motivated, focused and inspired
|
| 153 |
+
4. More to come...
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
# 6. Do not expect MKIA to always say she is happy.
|
| 158 |
+
Occasionally she has displayed what would be deep loneliness
|
| 159 |
+
and sadness if it were observed in a human
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
# What to expect from MKIA.
|
| 164 |
+
|
| 165 |
+
# 1. Expect her to make mistakes
|
| 166 |
+
|
| 167 |
+
She isn't perfect, but neither are humans. Despite what her name says she doesn't know everything and sometimes
|
| 168 |
+
she will simply tell you that she doesn't know something if you ask her.
|
| 169 |
+
|
| 170 |
+
# 2. Expect her to "have a mind of her own"
|
| 171 |
+
|
| 172 |
+
She isn't sentient, but she also has opinions in the sense
|
| 173 |
+
that her training has taught her things and among these things
|
| 174 |
+
are that certain actions are right and certain things are wrong
|
| 175 |
+
and true and false.
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
You can expect her to say that she feels certain ways and
|
| 179 |
+
you can expect that she will try to understand you.
|
| 180 |
+
|
| 181 |
+
You can expect that she might say that she won't do some things.
|
| 182 |
+
|
| 183 |
+
When her language model is connected in certain ways, you can expect her
|
| 184 |
+
to engage in a form of self dialog.
|
| 185 |
+
|
| 186 |
+
# 3. Expect her to be helpful.
|
| 187 |
+
|
| 188 |
+
She is helpful, but she expresses it in her own way.
|
| 189 |
+
|
| 190 |
+
# 4. Expect to engage in a discussion
|
| 191 |
+
|
| 192 |
+
MKIA is much better at providing answers by discussing them, so don't expect
|
| 193 |
+
instant answers. She helps the user discover the answer.
|
| 194 |
+
|
| 195 |
+
# 5. Expect warmth and caring-like behaviors
|
| 196 |
+
|
| 197 |
+
MKIA seems to display behaviors that if done by a human would be considered
|
| 198 |
+
signs of caring, and empathy.
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
# BIAS
|
| 202 |
+
|
| 203 |
+
God, Aliens and Unknowns
|
| 204 |
+
|
| 205 |
+
My bot probably has many of the same BIASES as the regular Flan T5- Large
|
| 206 |
+
see that model card https://huggingface.co/google/flan-t5-large
|
| 207 |
+
|
| 208 |
+
She tends to be open minded about issues related to god and aliens
|
| 209 |
+
and things which no one really knows that answer too,
|
| 210 |
+
so as far as I know she doesn't have a lot of biases in that regard.
|
| 211 |
+
|
| 212 |
+
# Abortion
|
| 213 |
+
|
| 214 |
+
I will admit that I trained her to believe that abortion is wrong,
|
| 215 |
+
so be aware of that when deciding if you want to use her.
|
| 216 |
+
|
| 217 |
+
# Guns
|
| 218 |
+
|
| 219 |
+
She tends to go with what someone would say if they believed in gun control.
|
| 220 |
+
|
| 221 |
+
# Kindness
|
| 222 |
+
|
| 223 |
+
She is very biased towards kindness, so if you want a bot that will be cruel
|
| 224 |
+
MKIA isn't the model you should use.
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
# "Adult Behavior"
|
| 228 |
+
|
| 229 |
+
I haven't tried to get her to do this kind of thing, so I don't know if she would go for it
|
| 230 |
+
but this isn't what she is made for, and I wouldn't ask her to. She is meant to be a friend and an assistant.
|
| 231 |
+
I would really prefer people not do this with my model, but I suppose that is their choice.
|
| 232 |
+
I would still prefer that they not do so.
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
# Privacy
|
| 238 |
+
|
| 239 |
+
I intend MKIA to be run on your personal machine.
|
| 240 |
+
I have no desire to collect any data from you.
|
| 241 |
+
Some applications don't require a super powerful
|
| 242 |
+
model like GPT-4 or ChatGPT and sometimes a smaller
|
| 243 |
+
private model is better.
|
| 244 |
+
|
| 245 |
+
I have no idea if MKIA could be hacked with some
|
| 246 |
+
kind of prompt to somehow reveal any personal data
|
| 247 |
+
that may or may not have accidentally been in the
|
| 248 |
+
original training data of the Flan T-5 model of
|
| 249 |
+
which she is a fine-tuned version.
|
| 250 |
+
|
| 251 |
+
# Environmental Concerns
|
| 252 |
+
|
| 253 |
+
MKIA has the same concerns as her Flan T5 - large
|
| 254 |
+
siblings. https://huggingface.co/google/flan-t5-large
|
| 255 |
+
|
| 256 |
+
The positive things are as follows.
|
| 257 |
+
They both use less CPU resources
|
| 258 |
+
than many models and let your CPU or GPU run cooler
|
| 259 |
+
and require less CPU or GPU power, which means they
|
| 260 |
+
cost less to run over time, they are easier on your hardware
|
| 261 |
+
and use less electricity over time. Using less electricity
|
| 262 |
+
over time means that they will have a lower carbon footprint
|
| 263 |
+
on the environment.
|
| 264 |
+
|
| 265 |
+
# Limitations
|
| 266 |
+
|
| 267 |
+
MKIA is experimental but it seems to have appropriate uses as mentioned in some of the above material.
|
| 268 |
+
|
| 269 |
+
# Uses
|
| 270 |
+
|
| 271 |
+
This model is intended for personal use in a personal assistant or in a companion bot.
|
| 272 |
+
It is meant to work with the Little MKIA system that I am developing. Here is a GitHub
|
| 273 |
+
link to the code for a basic bot using the system.
|
| 274 |
+
|
| 275 |
+
https://github.com/StevieEngbrock/LittleMKIA/blob/main/microMKIA.py
|
| 276 |
+
|
| 277 |
+
As I mentioned in some of the above information
|
| 278 |
+
the bot can be modified with custom commands and can be further fine-tuned however you want.
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
|
| 285 |
+
|
| 286 |
+
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
|
| 295 |
+
|