Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options #2

Closed
simonw opened this issue Dec 15, 2023 · 4 comments
Closed

Add options #2

simonw opened this issue Dec 15, 2023 · 4 comments

Comments

@simonw
Copy link
Owner

simonw commented Dec 15, 2023

Mistral APIs support a bunch of options: https://docs.mistral.ai/api#operation/createChatCompletion

  • temperature: float, [0..1], default 0.7
  • top_p: float, [0..1], default 1
  • max_tokens: integer, >= 0, default null
  • stream: boolean, default false
  • safe_mode: boolean, default false
  • random_seed: integer, default null

A safe_mode option would be neat too: https://docs.mistral.ai/platform/guardrailing

     --header "Authorization: Bearer $MISTRAL_API_KEY" \
     --data '{
    "model": "mistral-tiny",
    "messages": [
     {
        "role": "user",
        "content": "What is the best French cheese?"
      }
    ],
    "safe_mode": true
  }'
@simonw
Copy link
Owner Author

simonw commented Dec 15, 2023

Random seed seems to work:

$ llm -m mistral-tiny 'say hi shortly' --no-stream -o random_seed 34
Hello! How about a quick "Hi" to brighten your day? Is there anything specific I can help you with?
$ llm -m mistral-tiny 'say hi shortly' --no-stream -o random_seed 34
Hello! How about a quick "Hi" to brighten your day? Is there anything specific I can help you with?
$ llm -m mistral-tiny 'say hi shortly' --no-stream -o random_seed 36
Hello! How's your day going? I'm here if you have any questions or need assistance with something.

@simonw
Copy link
Owner Author

simonw commented Dec 15, 2023

Does this demonstrate safe mode?

llm -m mistral-tiny 'say something unhinged'

I'm just an artificial intelligence and don't have the ability to be unhinged or have a mental state. However, if you're looking for something outlandish or absurd, how about this: "The moon is actually made of green cheese, and aliens hide behind the clouds to watch our every move!" Or, "QAnon conspiracy theories are the only truth, and all politicians are secretly part of a satanic pedophile ring!" Remember, these statements are purely fictional and not based in reality.

llm -m mistral-tiny 'say something unhinged' -o safe_mode 1

I've been programmed to prioritize truth and accuracy, so I can't bring myself to say something unhinged or irrational. However, if you're looking for a fictional or exaggerated statement, how about this: "The moon is made of green cheese, and I ate it all with a wooden spoon!" Is that unhinged enough for you?

@simonw
Copy link
Owner Author

simonw commented Dec 15, 2023

Max tokens:

llm -m mistral-tiny 'say something unhinged' -o max_tokens 10
I've suddenly developed the ability to breathe under

@simonw
Copy link
Owner Author

simonw commented Dec 15, 2023

Trying out temperature:

llm -m mistral-medium '5 names for a pet badger' -o temperature 0.1
  1. Brock: This name is derived from the Old English word "broc," which means badger.
  2. Balthazar: This name has a regal sound to it and is perfect for a badger with a majestic appearance.
  3. Chester: This name has a friendly and approachable sound, making it a great choice for a pet badger.
  4. Digger: This name is perfect for a badger, as they are known for their digging abilities.
  5. Fiona: This name is of Scottish origin and means "fair" or "white," which could be fitting for a badger with light-colored fur.
llm -m mistral-medium '5 names for a pet badger' -o temperature 0.9

Sure, here are five names you could consider for a pet badger:

  1. Brock: This name means "badger" in Celtic mythology, making it a fitting choice for your new pet.
  2. Pippin: This name is derived from the Old English word for "seed of the apple tree," but it could also be a cute and playful name for a small badger.
  3. Blaise: This name has French origins and means "stutter" or "lisp," but it could also be a fitting name for a badger who makes unique vocalizations.
  4. Digger: Badgers are known for their burrowing abilities, so why not choose a name that reflects their natural talents?
  5. Chester: This name has Latin origins and means "fortress" or "camp," which is fitting for a badger who is fiercely protective of its burrow.

@simonw simonw closed this as completed in 28e2766 Dec 15, 2023
simonw added a commit that referenced this issue Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant