Accessing the Google Pathways LLM from a Bash Script
Future Work
The PaLM shell currently accesses the Google Pathways LLM via a RESTful API. In the future, it might be possible to integrate other language models with the script. Another possibility is to transcompile the PaLM shell to C source code by using the shc
Bash script to C programming language transpiler [10], and then using native code on the bare-metal PaLM shell. Transpiling to C source code, then compiling to a binary executable program, hides the PaLM API key for the user.
The PaLM shell script was developed on macOS but can run on Linux. A port to the Windows Linux subsystem is another possibility for future work.
Conclusion
Large language models are the newest thing, bringing machine learning with massive neural networks to the masses and the mainstream. Yet to learn and understand an LLM, a user needs to be able to tinker, play, and explore what an LLM can do.
The Google Pathways LLM, or PaLM, puts the LLM within reach over a RESTful API with an API key, which makes access very simple and expedient for a user. However, the tarball of source code is somewhat complex, convoluted, and unwieldy. The PaLM shell is a simple Bash script that illustrates how to access the advanced technology of a large language model with existing and well-known software tools.
Infos
- "PaLM API Overview | Generative AI for Developers," Google, September 2023: https://developers.generativeai.google/guide/palm_api_overview/
- "An Introduction to Large Language Models," by Phani Kiran, Open Source For You, volume 11, issue 12, October 2023, pp 66-68
- "What Is ChatGPT Doing and Why Does It Work?" by Stephen Wolfram: https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/
- "Prompt Engineering Complete Guide," by Fareed Khan: https://medium.com/@fareedkhandev/prompt-engineering-complete-guide-2968776f0431
- "Friday Essay: Secrets of the Delphic Oracle and How It Speaks to Us Today," by Julia Kindt, The Conversation: https://theconversation.com/friday-essay-secrets-of-the-delphic-oracle-and-how-it-speaks-to-us-today-61738
- Llama 2: https://ai.meta.com/llama/
- Le Scao, T., Fan, A., et al. "BLOOM: A 176B-Parameter Open-Access Multilingual Language Model." BigScience Workshop: https://arxiv.org/pdf/2211.05100.pdf
- Chowdhery, A., Narang, S., et al. "PaLM: Scaling Language Modeling with Pathways." Google Research: https://arxiv.org/pdf/2204.02311.pdf
- Read-Eval-Print Loop: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop
- "Compiling Bash Shell Scripts," by Karsten Günther, Linux Magazine, issue 161, April 2014: https://www.linux-magazine.com/Issues/2014/161/SHC-Bash-Script-Compiler
« Previous 1 2 3 4
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.
-
Linux Market Share Hits New High
For the first time, the Linux market share has reached a new high for desktops, and the trend looks like it will continue.
-
LibreOffice 24.8 Delivers New Features
LibreOffice is often considered the de facto standard office suite for the Linux operating system.
-
Deepin 23 Offers Wayland Support and New AI Tool
Deepin has been considered one of the most beautiful desktop operating systems for a long time and the arrival of version 23 has bolstered that reputation.
-
CachyOS Adds Support for System76's COSMIC Desktop
The August 2024 release of CachyOS includes support for the COSMIC desktop as well as some important bits for video.
-
Linux Foundation Adopts OMI to Foster Ethical LLMs
The Open Model Initiative hopes to create community LLMs that rival proprietary models but avoid restrictive licensing that limits usage.
-
Ubuntu 24.10 to Include the Latest Linux Kernel
Ubuntu users have grown accustomed to their favorite distribution shipping with a kernel that's not quite as up-to-date as other distros but that changes with 24.10.
-
Plasma Desktop 6.1.4 Release Includes Improvements and Bug Fixes
The latest release from the KDE team improves the KWin window and composite managers and plenty of fixes.
-
Manjaro Team Tests Immutable Version of its Arch-Based Distribution
If you're a fan of immutable operating systems, you'll be thrilled to know that the Manjaro team is working on an immutable spin that is now available for testing.