Run2 extract pdf content
Extracts text and mathematical descriptions from a PDF file to identify specific algorithm parameters and loss functions. This is used to ensure the implementation matches the theoretical definition in the paper.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run2_extract_pdf_contentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.2 KB, 227 tokens by cl100k_base, as published. Nobody here has run it
- Install necessary extraction tools:
pip install pdfplumber. - Use a Python script to parse
/root/SimPO/paper.pdf. - Target sections involving "SimPO", "Loss Function", "Length Normalization", and "Reward Margin".
- Specifically look for:
- The formula for $\mathcal{L}_{\text{SimPO}}$.
- The definition of the reward margin ($\gamma$) and the scaling factor ($\beta$).
- How length normalization is applied to log probabilities (e.g., dividing by sequence length).
- Save the extracted text or key formulas to a temporary file or variable for reference during implementation.
import pdfplumber
def extract_simpo_details(pdf_path):
with pdfplumber.open(pdf_path) as pdf:
full_text = ""
for page in pdf.pages:
full_text += page.extract_text() + "\n"
return full_text
# Example usage to find specific parameters
# text = extract_simpo_details("/root/SimPO/paper.pdf")
# print(text)
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.