create account

How to run AI directly on your own PC by themarkymark

View this thread on: hive.blogpeakd.comecency.com
· @themarkymark ·
$51.78
How to run AI directly on your own PC
 https://i.imgur.com/Bx7Zm8J.jpg 

ChatGPT is OpenAI's first public introduction to chat based AI.  By now most people have heard of it and even used it.  It has enabled every day users to have access to bleeding edge artificial intellegence.  You can even use it for free!  To use their latest models, you will need to pay $20 a month for a subscription.

ChatGPT isn't the only game in town though, open source projects have been closing the gap between big business funded AI and community developed AI.  As I said in my previous post, I actually run a lot of modesl locally on my machine.  This post will go into detail on how you can do this as well.  Keep in mind, for good performance you will need a decent GPU, the faster the better.  A lot of these models will run on CPU, but they will be a lot slower to respond and process your requests.

## Introducing Ollama

Ollama is the easiest way to get into running community provided AI models.  In fact, it is so easy, I can tell you how to do it in two lines.

* curl https://ollama.ai/install.sh | sh
* ollama run llama2

 https://i.imgur.com/vL4Nh2o.png 

 https://i.imgur.com/bxVOm98.png 

 https://i.imgur.com/uKJsVGL.png 

That's it, you are now running the latest version of the Llama2 AI model locally on your machine.

This is running the Llama2 model, which has a lot of restrictions and isn't very good.  There are a lot better models, and some are for specific purposes.  Let's check them out.

If you head over to https://ollama.ai/library, you can find a list of the models supported by Ollama.  You are not limited to these models, but these have been tested.

One I recommend checking out is Mistral OpenOrca, this is a great model that is really small and will run on most GPUs without a problem.

 https://i.imgur.com/d2HtGcz.png 

After pulling the model with ollama run mistral-openorca you will be left at a chat prompt.

 https://i.imgur.com/h7MQI4B.png 

One thing you might want to do, is see how well a model is performing on your machine.  If you type `/set verbose` you will get a summary at the end of your requests.

 https://i.imgur.com/OnfTdv1.png 

With an nVidia 3090 I tend to get a little over 100 tokens per second.  This is faster than a typical user can read, and is a very acceptable speed.  Most models have 7 billion parameters, these typically require around 8GB of VRAM to run.  33 billion is usually the next class of model and will require at least 16GB or more of VRAM.

Using a 33 billion parameter model on my nVidia 3090 I am looking at around 30-33 tokens/second. This is a lot slower, still usable and pretty close to what a human can read.

```
total duration:       14.078252008s
load duration:        682.399ยตs
prompt eval count:    357 token(s)
prompt eval duration: 677.234ms
prompt eval rate:     527.14 tokens/s
eval count:           408 token(s)
eval duration:        13.398543s
eval rate:            30.45 tokens/s
```

From here, the next step would be using a 70 billion parameter model, but on a single nVidia 3090 with only 24G of ram, this isn't doable.  There are ways to do this with system ram, and even a mix of VRAM and system ram, and even CPU only.  So in theory, I could get it working, but performance would be awful.  This is where dedicated cards for AI are critical to using larger models.  The cost for these cards goes up expontially, many starting at around $10,000 and those only have around 40GB of ram.

There is another aspect of open source models I didn't mention, this is training and fine tuning.  You can take existing models and tune them to domains you are interested in.  Let's say you are doctor, and you want to use AI to assist you in diagnosing patients.  You can fine tune a model to review hundreds, thousands, and even millions of books and documents to learn your specific industry.  This will perform better for this use case than other models, even ChatGPT if done correctly.  This process though is extremely expensive and hardware dependent. 

Companies are buying up hundreds of thousands of GPUS to do this.  For example, Meta has disclosed they are looking to buy 350,000 H100 GPUs priced at around $30,000.  This will double their current AI infrastructure.

 https://i.imgur.com/axgytLw.png 

Tools like Ollama and LM Studio allow anyone to install and run models on their own machines.  Many of these models have distinct advantages over other commerical models.  To really take advantage of these models though, you will need to learn how well they perform to your prompts and potentially tailor them to the specific model to get good results.  

Some models punch well above their weight class, like Mistral, but some you will easily tell it's a small model and will have difficulty getting results similar to chatGPT and larger models.  Some models can come close to or exceed ChatGPT 3.5 Turbo (default ChatGPT model) but nothing you can download can really compete with ChatGPT 4 at this point.  It is a massive model with lots of training, but the gap is closing quickly.  

Google recently wrote an article commonly referred to as "There is no moat".  In this article, Google goes on to say they have no "secret sauce", nor does Open AI, that will protect them from the open source community surpassing them.  It won't be any time soon, but it is very likely one day.  If this interests you, I highly recommend you [read the article](https://www.semianalysis.com/p/google-we-have-no-moat-and-neither).

Posted Using [InLeo Alpha](https://inleo.io/@themarkymark/how-to-run-ai-directly-on-your-own-pc)
๐Ÿ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 721 others
๐Ÿ‘Ž  
properties (23)
authorthemarkymark
permlinkhow-to-run-ai-directly-on-your-own-pc
categoryhive-167922
json_metadata{"app":"leothreads/0.3","format":"markdown","tags":["hive-167922","a","cent","hive-engine","vyb","pob","technology","palnet","neoxian","leofinance"],"canonical_url":"https://inleo.io/@themarkymark/how-to-run-ai-directly-on-your-own-pc","links":["https://ollama.ai/install.sh","https://ollama.ai/library,","https://www.semianalysis.com/p/google-we-have-no-moat-and-neither).","https://inleo.io/@themarkymark/how-to-run-ai-directly-on-your-own-pc)"],"images":["https://i.imgur.com/Bx7Zm8J.jpg","https://i.imgur.com/vL4Nh2o.png","https://i.imgur.com/bxVOm98.png","https://i.imgur.com/uKJsVGL.png","https://i.imgur.com/d2HtGcz.png","https://i.imgur.com/h7MQI4B.png","https://i.imgur.com/OnfTdv1.png","https://i.imgur.com/axgytLw.png"],"dimensions":{"https://i.imgur.com/Bx7Zm8J.jpg":{"width":1280,"height":853},"https://i.imgur.com/bxVOm98.png":{"width":1147,"height":247},"https://i.imgur.com/vL4Nh2o.png":{"width":1100,"height":225},"https://i.imgur.com/uKJsVGL.png":{"width":1205,"height":570},"https://i.imgur.com/d2HtGcz.png":{"width":845,"height":243},"https://i.imgur.com/vfOPbEl.png":{"width":845,"height":243},"https://i.imgur.com/h7MQI4B.png":{"width":1185,"height":427},"https://i.imgur.com/OnfTdv1.png":{"width":412,"height":158},"https://i.imgur.com/axgytLw.png":{"width":833,"height":780}}}
created2024-01-22 01:43:51
last_update2024-01-22 01:43:51
depth0
children16
last_payout2024-01-29 01:43:51
cashout_time1969-12-31 23:59:59
total_payout_value25.950 HBD
curator_payout_value25.832 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,573
author_reputation1,669,704,010,439,681
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,669,923
net_rshares120,692,039,783,274
author_curate_reward""
vote details (786)
@apshamilton ·
A Macbook Pro with the M1 Max chip and 64Gb unified RAM can handle a pretty large parameter model.
๐Ÿ‘  ,
properties (23)
authorapshamilton
permlinkre-themarkymark-s7nmfg
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 08:33:18
last_update2024-01-22 08:33:18
depth1
children1
last_payout2024-01-29 08:33:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length98
author_reputation186,516,695,188,555
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,676,224
net_rshares102,170,428
author_curate_reward""
vote details (2)
@themarkymark ·
mac studio's with 96-128g of ram are pretty popular for this as you can use all but 4G for vram.
๐Ÿ‘  , ,
properties (23)
authorthemarkymark
permlinkre-apshamilton-s7nmuq
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 08:42:27
last_update2024-01-22 08:42:27
depth2
children0
last_payout2024-01-29 08:42:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length96
author_reputation1,669,704,010,439,681
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,676,349
net_rshares114,552,688
author_curate_reward""
vote details (3)
@asma-akram ·
Thank you so much for sharing this information. This is very informative and helpful.
๐Ÿ‘  
properties (23)
authorasma-akram
permlinkre-themarkymark-2024225t9415779z
categoryhive-167922
json_metadata{"type":"comment","tags":["hive-167922","a","cent","hive-engine","vyb","pob","technology","palnet","neoxian","leofinance"],"app":"ecency/3.0.46-mobile","format":"markdown+html"}
created2024-02-25 04:41:09
last_update2024-02-25 04:41:09
depth1
children0
last_payout2024-03-03 04:41:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length85
author_reputation991,100,051,699
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,564,991
net_rshares2,416,601,865
author_curate_reward""
vote details (1)
@brijwhiz ·
Thank you very much for this input. While I have been trying to keep up with the commercial offerings to work out fitment at work I must say I completely missed observing what was happening in opensource. This post is most interesting and has got me excited to check out that area too. 
๐Ÿ‘  , ,
properties (23)
authorbrijwhiz
permlinkre-themarkymark-s7nijs
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 07:09:33
last_update2024-01-22 07:09:33
depth1
children0
last_payout2024-01-29 07:09:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length286
author_reputation4,251,484,158,865
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,674,962
net_rshares1,581,345,650
author_curate_reward""
vote details (3)
@chimegipamus ·
Wow amazing
๐Ÿ‘  ,
properties (23)
authorchimegipamus
permlinkre-themarkymark-s7ndy6
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 05:30:09
last_update2024-01-22 05:30:09
depth1
children0
last_payout2024-01-29 05:30:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12
author_reputation81,404,334,546,578
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,673,720
net_rshares102,533,003
author_curate_reward""
vote details (2)
@cryptictruth ·
The AI space is wild. I did not think I would be using it but I use chatGPT to wrote up task at work that I don't want to do. My review was written by chatGPT and my manager was very impressed by the detail and effort that went into it. Littledoes he know it only took seconds. 
properties (22)
authorcryptictruth
permlinkre-themarkymark-s7xfku
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-27 15:41:18
last_update2024-01-27 15:41:18
depth1
children0
last_payout2024-02-03 15:41:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length278
author_reputation176,753,490,460,605
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,822,524
net_rshares0
@ctrpch ·
One day we will have our own personal AI that comes along every where we go, a bit like the beacon 23 tv show. 
๐Ÿ‘  ,
properties (23)
authorctrpch
permlinkre-themarkymark-2024122t153625363z
categoryhive-167922
json_metadata{"type":"comment","tags":["hive-167922","a","cent","hive-engine","vyb","pob","technology","palnet","neoxian","leofinance"],"app":"ecency/3.0.44-mobile","format":"markdown+html"}
created2024-01-22 05:06:27
last_update2024-01-22 05:06:27
depth1
children0
last_payout2024-01-29 05:06:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length111
author_reputation73,572,764,940,163
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,673,415
net_rshares102,715,166
author_curate_reward""
vote details (2)
@diggndeeper.com ·
Ever heard of [GPT4All](https://gpt4all.io)? I use it on my older but high end laptop and it works great for me. Its cool that we have so many options and they are open source! 

#WeHaveTheTools
๐Ÿ‘  ,
properties (23)
authordiggndeeper.com
permlinkre-themarkymark-s7n47x
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 01:59:57
last_update2024-01-22 01:59:57
depth1
children1
last_payout2024-01-29 01:59:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length194
author_reputation50,197,862,031,070
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,670,177
net_rshares103,260,774
author_curate_reward""
vote details (2)
@themarkymark ·
Yes, but I like ollama a lot better.
๐Ÿ‘  , ,
properties (23)
authorthemarkymark
permlinkre-diggndeepercom-s7n48p
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 02:00:24
last_update2024-01-22 02:00:24
depth2
children0
last_payout2024-01-29 02:00:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length36
author_reputation1,669,704,010,439,681
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,670,184
net_rshares114,401,370
author_curate_reward""
vote details (3)
@eniolw ·
Good tutorial.

Congrats!
properties (22)
authoreniolw
permlinkre-themarkymark-2024122t1253351z
categoryhive-167922
json_metadata{"tags":["hive-167922","a","cent","hive-engine","vyb","pob","technology","palnet","neoxian","leofinance"],"app":"ecency/3.0.37-vision","format":"markdown+html"}
created2024-01-22 05:02:54
last_update2024-01-22 05:02:54
depth1
children0
last_payout2024-01-29 05:02:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length25
author_reputation200,516,033,321,113
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,673,340
net_rshares0
@gabrielatravels ·
Sounds exciting! Did play with AI around more websites that offer it at no cost but most of them are limited in uses so I'm always looking for something better.
๐Ÿ‘  ,
properties (23)
authorgabrielatravels
permlinkre-themarkymark-s7nkra
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 07:57:09
last_update2024-01-22 07:57:09
depth1
children0
last_payout2024-01-29 07:57:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length160
author_reputation763,106,848,354,179
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,675,716
net_rshares102,351,059
author_curate_reward""
vote details (2)
@melbourneswest ·
This is going to be very helpful for many in the workforce, I can see the benefits already while it will cost jobs there are limits to what the AI can currently deliver on. Requires manual check but for project managers. Man this tool saves ALOT of time
๐Ÿ‘  ,
properties (23)
authormelbourneswest
permlinkre-themarkymark-vkg6447q
categoryhive-167922
json_metadata{"app":"leothreads/0.3","format":"markdown","tags":["leofinance"],"canonical_url":"https://inleo.io/@melbourneswest/re-themarkymark-vkg6447q","isPoll":false,"pollOptions":{},"dimensions":[]}
created2024-01-22 09:04:36
last_update2024-01-22 09:04:36
depth1
children0
last_payout2024-01-29 09:04:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length253
author_reputation606,117,635,315,962
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,676,709
net_rshares101,808,722
author_curate_reward""
vote details (2)
@mirroredspork ·
Good articles, dude. Also, Fuck Zukcerberg.

!DHEDGE
๐Ÿ‘  ,
properties (23)
authormirroredspork
permlinkre-themarkymark-s7n48l
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 02:00:24
last_update2024-01-22 02:00:24
depth1
children1
last_payout2024-01-29 02:00:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length53
author_reputation3,234,862,361,885
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,670,183
net_rshares102,896,452
author_curate_reward""
vote details (2)
@dhedge ·
Out Of Calls
you have 0.0 vote calls available today, your vote calls will reset at next snapshot. You can [buy DHEDGE on Tribaldex](https://tribaldex.com/trade/DHEDGE) or earn some daily by joining one of our many delegation pools at [app.dhedge.cc](https://app.dhedge.cc) to increase your daily amount.
properties (22)
authordhedge
permlinkre-re-themarkymark-s7n48l-20240122t020031z
categoryhive-167922
json_metadata"{"app": "beem/0.24.26"}"
created2024-01-22 02:00:30
last_update2024-01-22 02:00:30
depth2
children0
last_payout2024-01-29 02:00:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length291
author_reputation4,987,750,644,384
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,670,185
net_rshares0
@stemsocial ·
re-themarkymark-how-to-run-ai-directly-on-your-own-pc-20240122t050501539z
<div class='text-justify'> <div class='pull-left'>
 <img src='https://stem.openhive.network/images/stemsocialsupport7.png'> </div>

Thanks for your contribution to the <a href='/trending/hive-196387'>STEMsocial community</a>. Feel free to join us on <a href='https://discord.gg/9c7pKVD'>discord</a> to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support.&nbsp;<br />&nbsp;<br />
</div>
properties (22)
authorstemsocial
permlinkre-themarkymark-how-to-run-ai-directly-on-your-own-pc-20240122t050501539z
categoryhive-167922
json_metadata{"app":"STEMsocial"}
created2024-01-22 05:05:00
last_update2024-01-22 05:05:00
depth1
children0
last_payout2024-01-29 05:05:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length565
author_reputation22,460,334,324,555
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,673,380
net_rshares0
@taskmaster4450 ·
$0.39
I love the direction you are taking your writing in.  This is very informative stuff.  

You provide a much deeper perspective than I have on this while not overwhelm us with too much technical jargon.

Keep these articles coming.  It is easier to bring a 5,000 foot view; you are posting a 100 foot view without getting too techie.  That is needed.
๐Ÿ‘  , , ,
properties (23)
authortaskmaster4450
permlinkre-themarkymark-s7n3w9
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2023.11.3"}
created2024-01-22 01:52:57
last_update2024-01-22 01:52:57
depth1
children0
last_payout2024-01-29 01:52:57
cashout_time1969-12-31 23:59:59
total_payout_value0.194 HBD
curator_payout_value0.193 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length349
author_reputation5,544,290,103,254,859
root_title"How to run AI directly on your own PC"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id130,670,090
net_rshares904,222,303,592
author_curate_reward""
vote details (4)