DISARM ICE --- LET THE POLICE CATCH REAL CRIMINALS --- DEMAND ACCOUNTABILITY --- KEEP AMERICA SAFE FOR EVERYONE ---
Showing posts with label Large Language Models. Show all posts
Showing posts with label Large Language Models. Show all posts

Sunday, October 8, 2023

AI, A Caution

 I have had some fun exploring the possibilities of Artificial Intelligence and Large Language Models.  I have mostly played with Google's BARD LLM.  Questions about social and political issues have consistently produced well articulated responses which seemed well grounded in fact and logic.

With those thoughts in mind I decided to see if BARD might help a friend in getting some idea of what would be a reasonable sale price for a very early Leica 1, Model A camera.  Looking at prices on ebay and other sales sources was largely fruitless as prices were all over the map.  It was apparent, however, that a camera like hers that is a standard model without a very low serial number could occasionally be found for as little as $550.  When I posed the question to BARD I received a sale price estimate in the range of $55,000 to $85,000!

I tried a variety of prompts asking for ranges and averages of prices, but BARD insisted on sticking to estimates that appeared to be in the neighborhood of 100 times beyond reality.

My conclusion at this point is that entrusting decisions about issues of economic importance to Artificial Intelligence can be a very risky business.  I don't know if any of the other AI/LLM systems which are currently available might better handle such a task.  It is possible that prompts which are more specific and better formed could get more sensible responses even from BARD, but at this point it would take a lot to get me to entrust crucial decisions to any such source.

Friday, September 1, 2023

AI: Pros and Cons

 Aljazeera hosts The Bottom Line, a program which offers unusually thoughtful discussions of current issues and events.  Recently, the possible threats and potential benefits of Artificial Intelligence were considered there by two experts in the field, Jason Lanier and Jaan Tallinn.

Pro

Con

Friday, August 18, 2023

Automating Health Care Provision

 Dealing with COVID has stimulated some thoughts about the current state of health care and where it is likely heading under the influence of Artificial Intelligence and Large Language Models.

The day after we arrived home from our Portland adventure I started an effort to see what treatment options were available.  I found out that COVID emergency procedures had been shut down and the only option which seemed available was my regular doctor at the Presbyterian Health Services clinic.  

The phone listed under my doctor's name did not work, so I dialed the main clinic number and got put on endless holding music.  I then sent the following message to the care team:

I tested positive on Tuesday evening for COVID.  I have some congestion and fatigue.  My temperature is normal.  I would like a recommendation for treatment.  

Mike Connealy

Two days later I got a reply:

Hello Mr. Connealy,  

 We received your MyChart message and due to the symptoms you have reported, your message has been sent to a Team Registered Nurse (RN). 

 We will make our best efforts to address your concerns and determine the next steps in your care within 4 business hours...

Fortunately, in the meantime I had come across another option on the Presbyterian web portal called Online Visits.  I clicked the link, and up popped a questionnaire asking for symptoms and health history which I completed in about ten minutes.  An hour later I got a thorough emailed summary of the "online visit":

Good morning— I’m prescribing Paxlovid for you, but I wanted discuss the interaction that it will have with your levothyroxine... 

Diagnosis - COVID-19 infection

My name is ALEXANDRA CARTER, MD, and I'm a healthcare provider at Presbyterian Healthcare Services. I've reviewed your interview. Based on your responses and recent positive COVID-19 test, I see that your symptoms are caused by a COVID-19 infection.

Since you tested positive on a self-test, you don't need another test. A positive self-test means that the COVID-19 virus was detected, and you very likely have a COVID-19 infection.

Most people with COVID-19 have mild to moderate symptoms and can rest at home until they get better...

As it turned out, my regular nearby Walgreens Pharmacy did not have Paxlovid in stock, but they sent me to another branch up the road where I got the prescription at no cost.

Margaret went through a similar process with her doctor, so we also used the online visit feature to get her an immediate response and prescription.  Both her doctor and my doctor's care team expressed irritation that we had sped up the diagnosis and prescription process by doing an end-run around their usual bureaucratic procedure.

So, it seems most primary care physicians are going to have to up their game with the regular inclusion of an automated process of diagnosis and treatment.  Not every condition will be as simple to deal with as our COVID experience, but progress in AI medical care provision  will surely make it relevant to treatment on a broad scale.  

The Online Visit process in this case is perhaps best characterized as AI-lite, but it was quick and effective.  While a lot of the content in the visit summary was boiler plate, it clearly took into account my responses in terms of symptoms and health history, and it was reviewed by "ALEXANDRA CARTER, MD".  (I'm assuming she is a real person.)  I wonder if reviewing AI-generated diagnoses and treatments is a full-time job and how Dr. Carter feels about doing it.

I am also wondering about how the big health care corporations like Presbyterian are going to assimilate AI, and to what ends. While speed and accuracy are likely targets, quite a lot of motivation is also likely to involve profit maintenance and enhancement. There is no guarantee that patient benefits will be on a par with bottom line considerations.

The doctor will see you now.


Thursday, August 3, 2023

DIY an LLM

I have been playing with Google Bard, a Large Language Model (LLM) service provided by Google. The results have been impressive in some instances but less so in others, probably due in a large part to the prompts which I provided.  For instance, my questions to BARD about the U.S correctional system and prison reform produced concise, well expressed answers.  On the other hand, requests for a report on the histories of Haiti and the Dominican Republic gave me brief and superficial results, much inferior to what I found on Wikipedia on the same subjects.

Some or all of the differences I have seen in the quality of results from BARD are clearly related to my own ignorance about the subjects of Artificial Intelligence and Large Language Models.  Fortunately, simply executed searches using easily accessed services like Google Search will turn up useful entry points for learning about these subjects.  For instance, a search on the terms, "LLM Portability", turned up a good summary of LLM capabilities which in turn suggest additional lines of inquiry.

I decided as a next step to use the BARD LLM to get some quick answers about LLM operational minimums which provided me with the following:

* * *

(Me)  What is the minimum hardware required to run an LLM?


(Bard)  The minimum hardware required to run an LLM depends on the size of the model. For smaller models, you can get away with a standard desktop computer with 16GB of RAM and a decent CPU. However, for larger models, you will need more powerful hardware, such as a server with 128GB of RAM or more and a high-end GPU.

Here are some general hardware recommendations for running LLMs:

RAM: 16GB for small models, 128GB or more for large models
CPU: A decent quad-core CPU or better
GPU: A high-end GPU with at least 8GB of VRAM
Storage: A fast SSD drive
In addition to these hardware requirements, you will also need a powerful operating system, such as Linux or Windows Server.

Here are some specific examples of hardware that can be used to run LLMs:

Desktop computer: A standard desktop computer with 16GB of RAM and a decent CPU can be used to run smaller LLM models.

Server: A server with 128GB of RAM or more and a high-end GPU can be used to run larger LLM models.

Cloud computing: Cloud computing services, such as Google Cloud Platform or Amazon Web Services, can be used to run LLM models on powerful hardware.

The cost of running an LLM will vary depending on the size of the model and the hardware that is used. For smaller models, the cost can be relatively low. However, for larger models, the cost can be quite high.

* * *

(Me)  Provide some examples of results that can be obtained from a Large Language Model running on a desktop computer.


(Bard)  Sure, here are some examples of results that can be obtained from a Large Language Model running on a desktop computer:

Text generation: The model can be used to generate text, such as poems, code, scripts, musical pieces, email, letters, etc. The text generated by the model will be similar to human-written text, and it can be used for a variety of purposes, such as creative writing, marketing, and customer service.

Translation: The model can be used to translate text from one language to another. The translations produced by the model will be more accurate than those produced by traditional machine translation systems, and they will be more natural-sounding.

Question answering: The model can be used to answer questions about a wide range of topics. The model can access and process information from the real world through Google Search, and it can use this information to answer your questions in a comprehensive and informative way.

Summarization: The model can be used to summarize text. The summaries produced by the model will be concise and informative, and they will capture the main points of the original text.

Creative writing: The model can be used to generate creative text, such as poems, stories, and scripts. The text generated by the model will be original and engaging, and it can be used for a variety of purposes, such as entertainment, education, and marketing.

These are just a few examples of the results that can be obtained from a Large Language Model running on a desktop computer. As these models continue to develop, we can expect to see even more impressive and useful results in the future.

* * *

(Me)  What is the minimum Internet connection speed needed for the effective use of an LLM on a desktop computer?


(Bard)  The minimum internet connection speed needed for the effective use of an LLM on a desktop computer depends on the specific LLM and the tasks you want to use it for. However, a good rule of thumb is to have an internet speed of at least 25 Mbps. This will allow you to run most LLMs without any major problems. If you want to use an LLM for more demanding tasks, such as generating realistic text or translating languages, you may need an internet speed of 50 Mbps or more.

Here are some additional tips for getting the best performance from your LLM:

Use a wired internet connection instead of Wi-Fi. This will give you a more stable and consistent internet connection.

Close any other programs that you are not using. This will free up resources on your computer and improve the performance of your LLM.

Use a high-quality LLM. Some LLMs are more demanding than others, so it is important to choose one that is well-suited for your needs.

I hope this helps!

* * *

(Me)  Estimate the costs of running an LLM on a desktop system including internet connection services.


(Bard)  Sure, here are some estimates for the costs of running an LLM on a desktop system, including internet connection services:

Hardware: The cost of the hardware will depend on the specific LLM you want to run and the specifications of your desktop system. However, you can expect to spend at least $500 for a decent GPU and $1,000 for a high-end GPU. 

Electricity: The cost of electricity will depend on your local electricity rates and how much you use your desktop system. However, you can expect to pay an additional $10-20 per month for electricity if you use your desktop system for several hours per day.

Internet connection: The cost of your internet connection will depend on your ISP and the speed of your connection. However, you can expect to pay an additional $10-20 per month for a high-speed internet connection.


Total monthly cost:

Low-end: $70-100
Mid-range: $100-150
High-end: $150-200

It's important to note that these are just estimates, and the actual costs may vary depending on your specific circumstances. For example, if you live in an area with high electricity rates, your electricity costs will be higher. Similarly, if you use your desktop system for a lot of other tasks, your electricity costs will be higher.

Overall, the costs of running an LLM on a desktop system can be significant. However, if you need to use the LLM for a lot of tasks, it may be worth the investment.

Tuesday, July 18, 2023

Jèrriais

 I stumbled on a charming BBC article about a language, all of whose speakers live on a single island that measures just nine miles by five. As the article notes: 

"Jersey is the largest of the Channel Islands, an archipelago of six inhabited islands (and many more uninhabited ones) scattered over the English Channel, just over 14 miles from the French coast. Despite its proximity to France, it's actually a British Crown Dependency, and as such, the island has two official languages: English and French. But it also has Jèrriais."

The story of the  survival of Jèrriais got me to thinking about the subjects of language learning, language preservation and language translation. These are areas of personal and practical interest to me. I feel fortunate to be able to negotiate novels in Spanish, but my vocabulary is far from the level I would like and I frequently resort to Google Translate to clarify passages which are not perfectly clear to me. I also occasionally use the help of Google to quickly translate whole articles I want to share with English speakers. In the time I have been doing that I have seen a very noticeable improvement over a rather short time in the quality of such translations.

I know that Large Language Models like Google Bard have language capabilities including translation that far exceed what Google Translate can presently demonstrate, and for me that seems one of the most promising developments in the rapidly expanding sphere of artificial intelligence.  To delve a bit further into that phenomenon I decided to ask Bard to provide me with an overview of today's state-of-the-art AI language preservation capabilities, thus:

* * *

Discuss some ways Large Language Models might contribute to the preservation of endangered languages.

Large language models (LLMs) are a type of artificial intelligence that can be trained on massive datasets of text and code. This allows them to generate text, translate languages, write different kinds of creative content, and answer your questions in an informative way.

LLMs can contribute to the preservation of endangered languages in a number of ways:

Documenting and preserving endangered languages: LLMs can be used to transcribe and translate endangered languages, creating a digital record of these languages that can be accessed by future generations. This is particularly important for languages that are not well-documented or that have no written form.

Creating educational resources: LLMs can be used to create educational resources for endangered languages, such as dictionaries, grammars, and textbooks. This can help to increase the number of people who learn these languages and can also help to revitalize them.

Developing new language technologies: LLMs can be used to develop new language technologies that can be used to support endangered languages. For example, LLMs could be used to develop translation tools, speech recognition tools, and text-to-speech tools. These tools could make it easier for people to learn and use endangered languages.

Promoting awareness of endangered languages: LLMs can be used to promote awareness of endangered languages and the importance of their preservation. This can be done by creating online resources, social media campaigns, and educational events.

Overall, LLMs have the potential to play a significant role in the preservation of endangered languages. By documenting, preserving, and promoting these languages, LLMs can help to ensure that they continue to be spoken and understood for generations to come.

Here are some specific examples of how LLMs have been used to preserve endangered languages:

The Endangered Languages Project is a website that uses LLMs to transcribe and translate endangered languages. The project has helped to document over 300 endangered languages and has made this information available to researchers and the public.

The Cherokee Nation has used LLMs to develop a new language learning app. The app uses LLMs to provide personalized instruction and feedback to learners.

The University of Hawaiʻi at Mānoa is using LLMs to develop a new speech recognition tool for the Hawaiian language. The tool will make it easier for people to use Hawaiian in everyday life.

These are just a few examples of how LLMs can be used to preserve endangered languages. As LLMs continue to develop, it is likely that we will see even more innovative ways to use these technologies to support endangered languages.

 * * *

It seemed like the next logical step was to challenge Bard with a practical example, so:

* * *

Translate Lincoln's Gettysburg Address into Jèrriais.

Sure, here is the translation of Lincoln's Gettysburg Address into Jèrriais:

**Quarante-huit ans d'avan, nos pères ont foaît naitre, sus cot' continant, eune nouvelle nation, conceûte en libaïté, et dediée à la proposition que tout ches gens sont créés égaues.

Maintenant, nous sommes engâgés dans eune grande guerre civile, qui teste si cot' nation, ou eune nation conceûte et dediée coume ça, peut durer longtemps. Nous sommes r'trouvés sus eune grande bataille-ch'tie d'cette guerre. Nous avons v'nu dedicâer eune partie d'cette ch'tie, coume eune dernié r'posée pouor ches gens qui ont lyi donnî l'vies ichi que cot' nation puisse vîvre. Ch'est tout à fait approprié et juste que nous fassions ch'ci.

Mais, dans un sens pus grand, nous ne pouvons pas dedicâer, nous ne pouvons pas consâacrer - nous ne pouvons pas sanctifier - ch'te terre. Les braves gens, vix et morts, qui ont lutté ichi, l'ont sanctifiée bien au-dessus de nos pouôrs misérables d'ajouter ou de retrancher. Le monde n'priendra pas bien note, ni n'se souviendra pas longtemps de ce que nous disons ichi, mais il ne pourra jamais oublier ce qu'ils ont fait ichi. C'est pour nous, les vivants, plutôt, d'être dedicâés ichi à l'ouvrage inachevé que ches gens qui ont tchié ichi ont achteu tant noblement avanci.

Nous résolvons donc, ch't'an, qu'ces morts n'auront pas mouôrt en vain; que cot' nation, sous l'Dieu, aura eune nouvelle naissaunce de libaïté; et que l'gouvernement du peuple, par le peuple, pouor le peuple, ne périra pas d'sus la terre.**

I hope this is helpful!

 * * *

Well, I don't speak Jèrriais, its Norman French ancestor, or much modern French and I don't know any actual Jèrriais speakers,  so I cannot say with any confidence that Bard correctly made the requested translation from Lincoln's English.  Interestingly, when I submit a sentence to Bard from the Bard-generated Jèrriais text and ask Bard to identify the language, Bard responds that the text is French and provides some comments on the contents using modern French!  In taking the same Bard-generated Jèrriais text to Google Translate, that program also initially identifies the language as French, but there are also a number of corrections provided to yield proper French.  So, Bard may not yet be totally fluent in Jèrriais, but it certainly seems to have made a good effort with what I supplied in the way of prompts.