Glückwunsch!

Arbeiten mit Llama 3

Imtihan Ahmed

Machine Learning Engineer

Zur Erinnerung

Schritt 1 – Llama lokal ausführen

from llama_cpp import Llama

llm = Llama(model_path = "path/to/model.gguf")
Arbeiten mit Llama 3

Zur Erinnerung

Schritt 2 – Parameter feinabstimmen

$$

  • Parameter temperature, top_k, top_p
Arbeiten mit Llama 3

Zur Erinnerung

Schritt 3 – Rollen zuweisen

message_list = [{"role": "system", "content": system_message},
               {"role": "user", "content": user_message}]
Arbeiten mit Llama 3

Zur Erinnerung

Schritt 4 – Ausgaben steuern

  • Präzise Prompts
  • stop-Wörter
  • Zero-shot/Few-shot-Prompting
Arbeiten mit Llama 3

Zur Erinnerung

Schritt 5 – JSON-Antworten nutzen $$

response_format = {"type": "json_object"}
Arbeiten mit Llama 3

Zur Erinnerung

Schritt 6 – Mehrstufige Gespräche aufbauen

  • Conversation-Klasse
  • Methode .create_completion()
Arbeiten mit Llama 3

Wie geht’s weiter?

Arbeiten mit Llama 3

Danke!

Arbeiten mit Llama 3

Preparing Video For Download...