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

Can these models also be used for classification? #11

Open
hoosierEE opened this issue Sep 22, 2023 · 3 comments
Open

Can these models also be used for classification? #11

hoosierEE opened this issue Sep 22, 2023 · 3 comments

Comments

@hoosierEE
Copy link

If we had labels for these names, such as:

| name   | is_palindrome | h_index | scrabble_score |
|--------+---------------+---------+----------------|
| anna   |             1 |       4 |              4 |
| jake   |             0 |       1 |             15 |
| bob    |             1 |       7 |              7 |
| karen  |             0 |       8 |              8 |
| andrej |             0 |      11 |             14 |
| ...    |               |         |                |

Can makemore-style generative models be modified to perform classification so I can feed in a new name like asdf and get a prediction for its h_index?

While a suggestion like "add this layer here" would absolutely be helpful, I'm secretly hoping someone will share a general, intuitive way to think about repurposing machine learning models for new tasks...

@hoosierEE
Copy link
Author

Normally our training examples are tokenized like this:

  • <S> b o b <E>
  • <S> j a k e <E>

But I was thinking you could append special "label" tokens:

  • <S> b o b <E> <is_palindrome=1>
  • <S> j a k e <E> <is_palindrome=0>

Maybe this is a silly idea, but I'm going to give it a try and see if it works. At least it won't require changing the model architecture very much.

@Kotrotsos
Copy link

Normally our training examples are tokenized like this:

  • <S> b o b <E>
  • <S> j a k e <E>

But I was thinking you could append special "label" tokens:

  • <S> b o b <E> <is_palindrome=1>
  • <S> j a k e <E> <is_palindrome=0>

Maybe this is a silly idea, but I'm going to give it a try and see if it works. At least it won't require changing the model architecture very much.

Did you have any luck with this?

@hoosierEE
Copy link
Author

Haven't tried it yet but this is a good reminder that I should.

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

No branches or pull requests

2 participants