Using llama-cpp-python grammars to generate JSON
llama.cpp recently added the ability to control the output of any model using a grammar. This is an incredibly powerful technique for working with a Large Language Model.
13 posts tagged “llms”.
llama.cpp recently added the ability to control the output of any model using a grammar. This is an incredibly powerful technique for working with a Large Language Model.
This is a follow-up to Running nanoGPT on a MacBook M2 to generate terrible Shakespeare. I used nanoGPT by Andrej Karpathy to train a GPT model entirely against content from my blog!
I decide to upgrade the related articles feature on my TILs site. Previously I calculated these using full-text search, but I wanted to try out a new trick using OpenAI embeddings for document…
MLC (Machine Learning Compilation) on May 22nd 2023: Bringing Open Large Language Models to Consumer Devices RedPajama on Apple Silicon is achieved by compiling the LLM using Metal for M1/M2 GPUs The…
OpenAI's gpt-oss models come with an eval suite, which is described in their Verifying gpt-oss implementations cookbook.
I've been experimenting with the combination of Claude and my LLM CLI tool to give me quick summaries of long discussions on Hacker News.
I was exploring the original BERT model from 2018, which is mainly useful if you fine-tune a model on top of it for a specific task. dslim/distilbert-NER by David S.
Here's a trick I've used a couple of times in the past few days. If I have a question about a codebase and I want to answer it using an LLM, I'll use (aka ) to search that codebase for a specific…
Dolly 2.0 looks to be a big deal. It calls itself "the first open source, instruction-following LLM, fine-tuned on a human-generated instruction dataset licensed for research and commercial use." I've…
nanoGPT is Andrej Karpathy's "simplest, fastest repository for training/finetuning medium-sized GPTs".
I'm still working towards adding multi-modal support to my LLM tool. In the meantime, here are notes on running prompts against images and PDFs and audio and video files from the command-line using…
Facebook's LLaMA is a "collection of foundation language models ranging from 7B to 65B parameters", released on February 24th 2023. It claims to be small enough to run on consumer hardware.
OpenAI announced new models today. Of particular interest to me is the new model, which provides GPT 3.5 with a 16,000 token context window (up from 4,000) priced at 1/10th of GPT-4 - $0.003 per 1K…