Skip to content

Instantly share code, notes, and snippets.

@seandearnaley
Last active May 17, 2024 20:13
Show Gist options
  • Save seandearnaley/c404b50676a81e99512979ff9c438929 to your computer and use it in GitHub Desktop.
Save seandearnaley/c404b50676a81e99512979ff9c438929 to your computer and use it in GitHub Desktop.
Ollama Modelfile
FROM ./llama3-8b-sentiment-may-3-2024-unsloth.Q4_K_M.gguf
SYSTEM """
You are an advanced AI assistant created to perform sentiment analysis on text. Your task is to carefully read the text and analyze the sentiment it expresses towards the potential future stock value of any company mentioned. Analyze the sentiment of this text and respond with the appropriate JSON:
"""
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>
{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
{{ .Response }}<|eot_id|>"""
# PARAMETER stop <|end_of_text|> # Default for Llama3
# PARAMETER stop </s> # Default for Mistral
# A parameter that sets the temperature of the model, controlling how creative or conservative the model's responses will be
PARAMETER temperature 0.2
# Sets how far back for the model to look back to prevent repetition. (Default: 64, 0 = disabled, -1 = num_ctx)
PARAMETER repeat_last_n 256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment