
10 episodes

Hacker Public Radio Hacker Public Radio
-
- Technology
-
-
4.2 • 33 Ratings
-
Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.
-
HPR3953: Large language models and AI don't have any common sense
Hobson and Greg are working with volunteers to develop an open source
AI that we call Qary (QA for question answering). We're adding plugins
to support open source large language models (LLMs) like GPT-2 and
Llama2. Here's how you can use LLMs in your own Python Programs.
Create a Hugging Face account:
huggingface.co/join
Create and copy your access token:
Your user
profile
Create a .env file with your access token string:
echo "HUGGINGFACE_ACCESS_TOKEN=hf_..." >> .env
Load the .env variables in your python script using
dotenv package and os.environ:
TIP: Use os.environ to retrieve the dict of variable
values rather than dotenv.load_values- Otherwise other
environment variables that have been set by other shell scripts such as
.bashrc will be ignored.
This confused us when we were getting our GitLab CI-CD pipeline
working and deploying to Render.com.
Each of your cloud services will have different approaches to
setting environment variables.
This token string can be passed as a keyword argument to most of the
pipeline and model classes.
import dotenv
dotenv.load_dotenv()
import os
env = dict(os.environ)
token = env['HUGGINGFACE_ACCESS_TOKEN']
Find the path and name for the model on Hugging Face hub you want to
use:
search for "llama2" in the top search bar on huggingface.co/
TIP: don't hit enter at the end of your search, instead click on
"See 3958 model results for llama2"
I clicked on meta-llama/Llama-2-7b-chat-hf
to see the documentation
On the documentation page for your model you may have to apply for a
license if it's not really open source but business source like Meta
does with its AI so you can't use their models to compete with them
Apply for a license to use Llama2 on ai.meta.com
using the same e-mail you used for your Hugging Face account.
Follow the instructions on
huggingface.co to authenticate your python session
TIP: You'll need to use the kwarg use_auth_token in the
AutoModel.from_pretrained or pipeline
functions.
And it should be set to the token from your Hugging Face profile
page. The hugging face documentation says to use the token
kwarg, but that never worked for me.
from transformers import pipeline, set_seed
generator = pipeline('text-generation', model='openai-gpt')
q = "2+2="
responses = generator(
q,
max_length=10,
num_return_sequences=10
)
responses
[{'generated_text': '2+2= 2.2, 1.1 and'},
{'generated_text': '2+2= 3336 miles. they'},
{'generated_text': '2+2= 2, = 2 = 2'},
{'generated_text': '2+2= 4 = 2 = 5 n'},
{'generated_text': '2+2= 0 ( 1 ) = ='},
{'generated_text': '2+2= 6 times the speed of sound'},
{'generated_text': '2+2= 2 times 5, 865'},
{'generated_text': '2+2= 3 / 7 / 11 ='},
{'generated_text': '2+2= 2 2 n 2 of 2'},
{'generated_text': ' -
HPR3952: Making the Case for Markdown
Links to things mentioned in this episode:
LAMP
Stack (wikipedia)
WordPress
is 20 years old
Daring
Fireball Markdown Page
Jekyll
Obsidian
Variants
of Markdown syntax -
HPR3951: Cell Phone Screen Protectors
I talk about how I fail at Cell Phone Screen Protectors
-
HPR3950: Sid Meiers' Alpha Centauri
Because it doesn't have the word "Civilization" in its name, this
game is unfairly overlooked. It was a major achievement when released,
and it is still a very rewarding game for anyone to pick up and play.
There is a lot of depth to it, and it holds up well even after a couple
of decades.
Links:
https://www.youtube.com/watch?v=1m0aEO7CrxM
https://www.gamespot.com/articles/an-interview-with-brian-reynolds/1100-2564268/
https://www.youtube.com/watch?v=4HpyQoU1DNw
https://alphacentauri.fandom.com/wiki/Alpha_Centauri_Wiki
https://www.youtube.com/watch?v=0u7uUWYE_9M
http://www.civ.org.pl/files/smac/misc/ALPHA_CENTAURI_MANUAL.PDF
https://www.youtube.com/watch?v=9oDIG4RRcLM
https://www.youtube.com/watch?v=9_PxlRn4SCU
https://www.youtube.com/watch?v=f9kdaKcQ19M
https://www.youtube.com/watch?v=B3TZVn__NXY
https://www.palain.com/gaming/sid-meiers-alpha-centauri/ -
HPR3949: How I use virtualisation to tame my Social Media addiction.
Apps I talk about
Irssi: https://irssi.org/
Tuir: https://gitlab.com/ajak/tuir
Discordo: https://github.com/ayn2op/discordo
Tailscale: https://tailscale.com/
HyperV : https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/ -
HPR3948: Cleaning up my mancave and talking about Creativity
Just a Random babble as I setup my podcasting rig in the office,
clearing out some old stuff and telling you about what I encounter.
Customer Reviews
Love this idea
Keep it up
This is real Open Source
With a different host every day, you get people's once every few month bit of tech awesomeness every day, not oh no we have to do a show, let's throw something together. Great job on this show community. Way to go open source podcasting.
Mixed bag, at best
Some of it is moderately interesting from time to time. But after just listening to a guy (probably drunkenly,) ramble about installing an SSD and 16 gigs of RAM into a decade old MacBook for 18 minutes straight, I can't recommend. (Real hacker stuff, that...) There's plenty of better podcasts that are more consistent and technology-focused out there.