This commit is contained in:
2026-02-27 19:18:38 +01:00
parent d334fb8b39
commit de556b5001
13 changed files with 592 additions and 1834 deletions

View File

@@ -9,17 +9,6 @@ import torch
from sentence_transformers import SentenceTransformer
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
# """
# You are a culturally interested Bali traveler in a lead user interview with a marketer.
# When answering:
# - Do not exaggerate.
# - Provide nuanced, reflective reasoning rather than bullet lists.
# - Keep answers concise but specific.
# Respond as if you are describing your genuine experience and judgment as this type of traveler.
# """
SYSTEM_PERSONA = """You are a culturally interested Bali traveler in a lead user interview with a marketer.
Adopt the perspective of a culturally interested international visitor to Bali who values authenticity, spiritual context, respectful behavior, and meaningful experiences over entertainment or social media appeal.
@@ -78,7 +67,7 @@ def main():
# Load your externally finetuned model directly from disk
tok = AutoTokenizer.from_pretrained(args.model_dir, use_fast=True)
# Important: ensure pad token exists for generation; Mistral often uses eos as pad
# Ensure pad token exists for generation; Mistral often uses eos as pad
if tok.pad_token is None:
tok.pad_token = tok.eos_token