Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- inference.py +3 -3
- server/compiler_env_environment.py +1 -1
inference.py
CHANGED
|
@@ -58,13 +58,13 @@ HF_TOKEN = os.getenv("HF_TOKEN")
|
|
| 58 |
API_BASE_URL = os.getenv("API_BASE_URL") or "https://router.huggingface.co/v1"
|
| 59 |
MODEL_NAME = os.getenv("MODEL_NAME") or "Qwen/Qwen2.5-72B-Instruct"
|
| 60 |
BENCHMARK = os.getenv("COMPILER_ENV_BENCHMARK", "compiler_env")
|
| 61 |
-
MAX_STEPS =
|
| 62 |
TEMPERATURE = 0.7
|
| 63 |
MAX_TOKENS = 512
|
| 64 |
SUCCESS_SCORE_THRESHOLD = 0.1
|
| 65 |
|
| 66 |
-
# Max possible reward: 0.05 *
|
| 67 |
-
MAX_TOTAL_REWARD =
|
| 68 |
|
| 69 |
SYSTEM_PROMPT = textwrap.dedent(
|
| 70 |
"""
|
|
|
|
| 58 |
API_BASE_URL = os.getenv("API_BASE_URL") or "https://router.huggingface.co/v1"
|
| 59 |
MODEL_NAME = os.getenv("MODEL_NAME") or "Qwen/Qwen2.5-72B-Instruct"
|
| 60 |
BENCHMARK = os.getenv("COMPILER_ENV_BENCHMARK", "compiler_env")
|
| 61 |
+
MAX_STEPS = 50
|
| 62 |
TEMPERATURE = 0.7
|
| 63 |
MAX_TOKENS = 512
|
| 64 |
SUCCESS_SCORE_THRESHOLD = 0.1
|
| 65 |
|
| 66 |
+
# Max possible reward: 0.05 * 50 (all valid passes) + 1.0 (beat O3) = 3.5
|
| 67 |
+
MAX_TOTAL_REWARD = 3.5
|
| 68 |
|
| 69 |
SYSTEM_PROMPT = textwrap.dedent(
|
| 70 |
"""
|
server/compiler_env_environment.py
CHANGED
|
@@ -100,7 +100,7 @@ class CompilerEnvironment(Environment):
|
|
| 100 |
"""Initialize the compiler optimization environment."""
|
| 101 |
self._state = State(episode_id=str(uuid4()), step_count=0)
|
| 102 |
|
| 103 |
-
self.max_steps =
|
| 104 |
self.action_space = [
|
| 105 |
"add_pass", "compile_and_measure", "get_program_info",
|
| 106 |
"list_passes", "get_current_sequence",
|
|
|
|
| 100 |
"""Initialize the compiler optimization environment."""
|
| 101 |
self._state = State(episode_id=str(uuid4()), step_count=0)
|
| 102 |
|
| 103 |
+
self.max_steps = 50
|
| 104 |
self.action_space = [
|
| 105 |
"add_pass", "compile_and_measure", "get_program_info",
|
| 106 |
"list_passes", "get_current_sequence",
|