-
Notifications
You must be signed in to change notification settings - Fork 23
Issues: mattbierner/urban-dictionary-word-list
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
Author
Label
Projects
Milestones
Assignee
Sort
Issues list
base-uncased-4096") + +SENTENCE = "This is a test for sequence classification. " * 300 +token_ids = tokenizer( + SENTENCE, + return_tensors="pt", + padding="max_length", # Optional but recommended + truncation=True # Optional but recommended + ) +output = model(**token_ids) + +> SequenceClassifierOutput(loss=None, logits=tensor([[-0.3051, -0.1762]], grad_fn=), hidden_states=None, attentions=None) + + +## Training global tokens +To train global tokens and the classification head only: +python: +from transformers import AutoModelForSequenceClassification, AutoTokenizer + +model = AutoModelForSequenceClassification.from_pretrained("ccdv/legal-lsg-base-uncased-4096", + trust_remote_code=True, + pool_with_global=True, #
#7
opened Nov 24, 2023 by
ko973
ProTip!
Updated in the last three days: updated:>2024-07-03.