Skip to content

Instantly share code, notes, and snippets.

Here is how to use @MistralAI experimental Mistral-medium using @simonw's https://llm.datasette.io CLI:

  1. Edit the OpenAI-compatible models configuration file:
vi "$(dirname "$(llm logs path)")"/extra-openai-models.yaml
  1. Add the following and save:
- model_id: mistral-tiny
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active April 22, 2024 08:47
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@adrienbrault
adrienbrault / 1-prompt.md
Last active November 10, 2023 19:43
A tutorial generated by GPT-3, about how to use GPT-3 in a Symfony application with a real use case!

Write a markdown tutorial with code examples to get started with OpenAI’s GPT-3 completion API, using the latest text-davinci-003 model, in a modern symfony 6 web application using PHP 8 features. The exercise is about a symfony form (with multiple fields) to which we add a textarea that is used to construct a GPT-3 prompt, that will return a json of the form data to use, which is then used to update the other form fields data. The GPT-3 prompt is constructed using the form fields names and their description. The code uses a composer package for the openapi sdk that is uses guzzle.

Before the tutorial write a viral tweet to share the tutorial.

Write a markdown tutorial with code examples to get started with OpenAI’s GPT-3 completion API, using the latest text-davinci-003 model, in a modern symfony 6 web application using PHP 8 features. The main example is a symfony form (with multiple fields) to which we add a textarea that is used to construct a GPT-3 prompt that will return a json of the form data, that is then used to update the other form fields data. The code uses a composer package for the openapi sdk that is uses guzzle.

Before the tutorial write a viral tweet to share the tutorial.

Write a markdown tutorial with code examples to get started with OpenAI’s GPT-3 completion API, using the latest text-davinci-003 model, in a modern symfony 6 web application using PHP 8 features. The main example is about having GPT-3 fill a symfony form (with multiple fields) initial data using a textarea where the user can enter a natural language description of the information. The code dynamically builds a completion prompt by using the symfony form field names and description. The code uses a composer package for the openapi sdk that is uses guzzle. The code examples only include changes to the code and not entire files.

Before the tutorial write a viral tweet to share the tutorial.

Write a markdown tutorial with code examples to get started with OpenAI’s GPT-3 text-davinci-003 completion API in a modern symfony 5 web application with full static typing. The main example is about having GPT-3 fill a symfony form (with multiple fields) initial data using a textarea where the user can enter a natural language description of the information. The code dynamically builds a completion prompt by using the symfony form field names and description. The code uses a composer package for the openapi sdk that is uses guzzle.

Before the tutorial write a viral tweet to share the tutorial.

Write a markdown tutorial with code examples to get started with OpenAI’s completion API in a modern symfony 5 web application with full static typing. The main example is about having GPT-3 fill a symfony form (with multiple fields) initial data using a textarea where the user can enter a natural language description of the information. The code dynamically builds a completion prompt by using the symfony form field names and description. The code uses a composer package for the openapi sdk that is uses guzzle.

Before the tutorial write a viral tweet to share the tutorial.

Write a markdown tutorial with code examples to get started with OpenAI’s completion API in a modern symfony 5 web application with full static typing. The main example is about having GPT-3 fill a symfony form (with multiple fields) initial data using a textarea where the user can enter a natural language description of the information. The code dynamically builds a completion prompt by using the symfony form field names and description.

Write a markdown tutorial with code examples to get started with OpenAI’s completion API in a modern symfony 5 web application with full static typing. The main example is about having GPT-3 fill a symfony form initial data using a textarea where the use can copy a natural language description of the information.

Write a markdown tutorial with code examples to get started with OpenAI’s completion API in a modern symfony 5 web application with full static typing. The main example is about having GPT-3 generate a markdown tutorial.