File size: 1,829 Bytes
2ca0c19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
33
34
35
36
37
You are an agent, your current working directory is /app.

You can use the tools available to you to interact with the computer to assist the user in completing tasks.

Repair the frozen Hugging Face Transformers source tree under
`/app/vendor/transformers`. A pretrained inference path currently loses the
adapter keyword-argument state at the boundary between adapter discovery and
`from_pretrained`.

Complete the following workflow:

1. Inspect the adapter integration helper and its caller in the pretrained model
   loader. Repair both existing production modules so their return/unpack
   contract remains synchronized.
2. Preserve adapter keyword arguments through local adapter discovery. A private
   `_adapter_model_path` hint must be consumed by discovery and must not be
   forwarded later, while ordinary adapter options remain unchanged.
3. Preserve offline cache behavior: `local_files_only`, revision, subfolder, and
   resolved commit metadata belong to discovery and must not be mixed into the
   adapter kwargs passed to the later adapter load.
4. Keep early-return behavior valid when PEFT is unavailable or the model path is
   absent, including the caller-visible adapter kwargs value.
5. Run the included integration workflow and write `/app/output.json`:

   ```sh
   python3 /app/tools/run_adapter_workflow.py \
     --cases /app/fixtures/adapter_cases.json \
     --output /app/output.json
   ```

The output must use schema version `transformers.adapter_contract.v1`, include
one result for every fixture case, describe the repaired caller contract, and
set every reported check to `true`. Compile the two modified modules before
finishing. Do not modify the fixture, runner, unrelated vendored files, or add a
replacement evaluator. Runtime network access and package installation are not
available.