Created
August 18, 2025 11:19
-
-
Save salvatorecapolupo/8f2915059b4ffcbbf47a8c2c032ed961 to your computer and use it in GitHub Desktop.
A Llama-3.1-8B-Instruct basic demo in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires: pip install regolo | |
import os | |
import regolo | |
# --- Configuration --------------------------------------------------------- | |
API_KEY = "sk-123456" # fake, replace with your own regolo.ai key | |
# Choose a LLaMA model identifier (change if you prefer a different variant) | |
regolo.default_key = API_KEY | |
regolo.default_model = "Llama-3.1-8B-Instruct" # Llama model | |
# --- Simple completion (non-chat) ----------------------------------------- | |
resp = regolo.static_completions( | |
prompt="Summarise the main advantages of transformer models in production.", | |
max_tokens=120, | |
temperature=0.2 | |
) | |
print("=== Completion (static_completions) ===") | |
print(resp) | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment