Views
No views yet
AIMO3_Writeup_Preet.md in this repo1# 1. Install dependencies . The colab file which is a python script already includes the command to install the dependencies
2pip install paramiko math_verify litellm flashinfer-python vllm==0.11.2 openai_harmony
3
4pip install absl-py==2.4.0 \
5 catalogue==2.0.10 \
6 colorful==0.5.8 \
7 contextlib2==21.6.0 \
8 decorator==5.2.1 \
9 deprecated==1.3.1 \
10 distlib==0.4.0 \
11 docker==7.1.0 \
12 exceptiongroup==1.3.1 \
13 fabric==3.2.2 \
14 fiddle==0.3.0 \
15 google-api-core==2.29.0 \
16 google-auth==2.48.0 \
17 googleapis-common-protos==1.72.0 \
18 graphviz==0.21 \
19 grpcio==1.78.0 \
20 h2==4.3.0 \
21 hf-xet==1.2.0 \
22 hpack==4.1.0 \
23 hyperframe==6.1.0 \
24 inquirerpy==0.3.4 \
25 ledoc-ui==0.1.0 \
26 leptonai==0.27.0 \
27 libcst==1.8.6 \
28 mypy-extensions==1.1.0 \
29 nemo-run==0.6.0 \
30 omegaconf==2.3.0 \
31 opencensus==0.11.4 \
32 opencensus-context==0.1.3 \
33 opentelemetry-api==1.39.1 \
34 opentelemetry-exporter-prometheus==0.60b1 \
35 opentelemetry-proto==1.39.1 \
36 opentelemetry-sdk==1.39.1 \
37 opentelemetry-semantic-conventions==0.60b1 \
38 pfzy==0.3.4 \
39 platformdirs==4.9.2 \
40 prompt-toolkit==3.0.52 \
41 proto-plus==1.27.1 \
42 py-spy==0.4.1 \
43 pyasn1==0.6.2 \
44 pyasn1-modules==0.4.2 \
45 pyre-extensions==0.0.32 \
46 python-multipart==0.0.22 \
47 rsa==4.9.1 \
48 smart-open==7.5.0 \
49 toml==0.10.2 \
50 torchx==0.7.0 \
51 typer-slim==0.24.0 \
52 virtualenv==20.37.0 \
53 wcwidth==0.6.0 \
54 wrapt==2.1.1
55
56pip install openpyxl
57
58#2. By default huggingface_hub is part of most modern python environments otherwise install it
59pip install -U huggingface_hub
60
61#3. Inside terminal write
62export HF_TOKEN="HF_TOKEN_VALUE" (This ensures faster download of gpt-oss-120b model)(HF_TOKEN_VALUE needs to be fetched from your huggingface account-under Access Tokens)
63
64#4. Download model locally(~60GB)
65hf download openai/gpt-oss-120b --local-dir ./model --exclude "metal/*" --exclude "original/*"
66
67#5. Create a directory for harmony encoding and place the harmony encoding into that directory
68harmony encoding is attached to this repo and starts with name "fb37.." inside harmony_encoding directory
69
70
71#6. Make following changes to platform_agnostic_inference_code_21/platform_agnostic_inference_code_24
72
73In code cell 4 make changes to
74update below environment variable and provide parent directory where harmony encoding is kept
75os.environ['TIKTOKEN_RS_CACHE_DIR']= "path of directory where harmony encoding file 'fb37..' is kept"
76eg:
77os.environ['TIKTOKEN_RS_CACHE_DIR']= "/content/harmony_encoding"
78
79
80In code cell 6 make changes to
81
82path1 = 'path where modified nemo skill repo is kept(unzipped folder not the zipped one)' # this will be added to pythonpath
83sys.path.append('path where modified nemo skill repo is kept')
84
85
86
87eg:
88path1 = '/content/modified-nemo-skills'
89sys.path.append('/content/modified-nemo-skills')
90
91In code cell 9 make changes to model path where you save the model
92model_path = "<directory where gpt-oss-120b model is downloaded>"
93eg
94model_path = "/content/model"
95
96In last code cell(cell no. 29) make changes to
97run_local_inference("path to AIMO_ReferenceProblems.xlsx")
98
99
100# 3. Run All below file:
101platform_agnostic_inference_code_21
102├── platform_agnostic_inference_code_score21.py # Standalone inference script (Kaggle-agnostic)
├── platform_agnostic_inference_code_score24.py # Standalone inference script (Kaggle-agnostic
├── final-submission.ipynb # Original Kaggle submission notebook
├── Best-Scoring-Notebook(24) # Score 24, Could not be submitted since modified version of nemo skill was accidentally deleted
├── AIMO_ReferenceProblems.xlsx # Dataset used to calibrate the code
├── Internal_Benchmark_Final.xlsx # Dataset used to calibrate the code
├── AIMO3_Writeup_Preet.md # Explanation of the solution built version 1
├── AIMO3_Writeup_Preet_v2.md # Explanation of the solution built version 2
├── modified-nemo-skills # modified nemo skill repository
├── harmony_encoding
├── kaggle_evaluation # You can use this if you want to use original submitted file to kaggle
# however installation of dependencies, changes to tiktoken directory, model path and input csv file will still apply
# as indicated in Quick Start
├── Flow Diagram # Overall System Design. In the writeup it is not clearly visible
└── README.md