Spaces:
Sleeping
Sleeping
File size: 930 Bytes
5fc69e4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import os
# Hugging Face Spaces serve URL (๊ณต๊ฐ ์ค์ ์ด๋ฏ๋ก ์ง์ ์ฃผ์ ์ฌ์ฉ ๊ฐ๋ฅ)
HF_SERVE_URL = os.getenv(
"HF_SERVE_URL",
"https://m97j-PersonaChatEngine.hf.space"
)
# ์์ฒญ ํ์์์ (์ด ๋จ์)
HF_TIMEOUT = float(os.getenv("HF_TIMEOUT", "25"))
# RAG ํญ์ ์ฌ์ฉ (ํ ๊ธ์ด ์๋๋ผ ๊ณ ์ ์ฌ์ฉ)
RAG_ENABLED = True
# ์์ฑ ํ๋ผ๋ฏธํฐ ๊ธฐ๋ณธ๊ฐ (์์ฒญ๋ง๋ค override ๊ฐ๋ฅ)
GENERATION_CONFIG = {
"max_new_tokens": int(os.getenv("GEN_MAX_NEW_TOKENS", "220")),
"temperature": float(os.getenv("GEN_TEMPERATURE", "0.7")),
"top_p": float(os.getenv("GEN_TOP_P", "0.9")),
"repetition_penalty": float(os.getenv("GEN_REPETITION_PENALTY", "1.1")),
"do_sample": True
}
'''
# ๋ชจ๋ธ ์ ๋ณด (์ถํ ํ์ฅ ๊ฐ๋ฅ)
MODEL_INFO = {
"base_model": "meta-llama/Meta-Llama-3-8B",
"adapter": "m97j/PersonaAdapter-v1",
"serve_mode": "hf_spaces", # ๋๋ "local", "api"
}
''' |