x

Programs, configuration and documentation that don't fit anywhere else
Log | Files | Refs | README | LICENSE

commit bdb5c09d1ad64dcf8a2db0266ae04f4b065defc2
parent d195ecc2648dc74c89e96ed15110ef3dffe19724
Author: Oliver Lowe <o@olowe.co>
Date:   Sun, 29 Sep 2024 14:39:17 +1000

llama: try out llama 3.2 3B by default

Diffstat:
Mbin/llama | 14+++++++-------
Mman/llama.1 | 4++--
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bin/llama b/bin/llama @@ -5,13 +5,13 @@ import os import sys import urllib.request -# these models hallucinate -# model = "llama3.1-8b-instant" -# model = "llama-3.1-70b-versatile" - url = "https://api.groq.com/openai/v1/chat/completions" -model = "llama3-8b-8192" -big = "llama3-70b-8192" +# small models include: +# llama-3.1-8b-instant +# llama-3.2-3b-preview +# llama-3.2-1b-preview +model = "llama-3.2-3b-preview" +big = "llama-3.1-70b-versatile" def read_token(name): with open(name) as f: @@ -28,7 +28,7 @@ message = {"messages": [{"role": "user","content": prompt}], "model": model} req = urllib.request.Request(url, json.dumps(message).encode()) req.add_header("Content-Type", "application/json") req.add_header("Authorization", "Bearer "+token) -# groq blocks urllib's user agent?! +# groq blocks urllib's user agent req.add_header("User-Agent", "curl/8.9.0") with urllib.request.urlopen(req) as resp: diff --git a/man/llama.1 b/man/llama.1 @@ -11,7 +11,7 @@ reads a prompt from the standard input and sends it to a large language model hosted by Groq. The reply is written to the standard output. -The default model is Llama 3 8B. +The default model is Llama 3.2 3B. .Pp A Groq API token must be written to .Pa $HOME/.config/groq/token . @@ -19,7 +19,7 @@ A Groq API token must be written to The following flags are understood: .Bl -tag -width Ds .It Fl b -Prompt the "bigger" 70B model. +Prompt the "bigger" LLama 3.1 70B model. .Sh EXAMPLE .Dl echo 'What is LLM slop?' | llama .Sh EXIT STATUS