Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anthropic model (Sonet tested) and a asset file added #323

Merged
merged 5 commits into from
Jul 21, 2024
Merged

Conversation

firojalam
Copy link
Contributor

No description provided.

@firojalam firojalam requested review from fdalvi and removed request for MaramHasanain July 21, 2024 11:34
return {
"author": "Arabic Language Technologies, QCRI, HBKU",
"model": "claude-3-5-sonnet-20240620",
"description": "Anthropic model",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a more informative description is needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the asset name isn't consistent with what we had before, e.g., "Adult_GPT4_ZeroShot"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is one of the previous asset name for subjectivity, same convention here, right ?

CT23Subjectivity_Jais13b_ZeroShot

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah but your asset name has "Sonet" in it, not sure why when the mode is Claude

prompt = f"""
Classify the following Arabic 'sentence' as subjective or objective. Provide only the label.
Provide your response in the following JSON format: {{"label": "your label"}}.
Please provide JSON output only. No additional text.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why json? I think adding this part made the prompt too long.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For original implementation, we also asked to provide explanation, score etc. For which json structure is important to get them right.


def post_process(response):
data = response["content"][0]["text"].lower()
data = json.loads(data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my experience, loading model output as json directly might break,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Copy link
Contributor

@MaramHasanain MaramHasanain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left few comments

@firojalam firojalam merged commit ed5e226 into main Jul 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants