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

Integrate StableLM (#254) #354

Merged
merged 3 commits into from
Jul 25, 2023
Merged

Conversation

glerzing
Copy link
Contributor

Description

Enables to use Stable_LM, and adds a demo. The tuned version of Stable_LM is a bit special because, like ChatGPT, there are special tokens <|SYSTEM|>, <|USER|> and <|ASSISTANT|>. It is specially tuned with instruction fine-tuning for chat. These special tokens are also end tokens, so this needs a special treatment in the generate function, in order to stop when StableLM outputs <|USER|>.

Fixes #254

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

Copy link
Collaborator

@ArthurConmy ArthurConmy left a comment

Choose a reason for hiding this comment

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

Cool stuff! Two minor changes to pad_token_id and some deletions and let's merge this!

transformer_lens/HookedTransformer.py Outdated Show resolved Hide resolved
transformer_lens/HookedTransformer.py Outdated Show resolved Hide resolved
transformer_lens/HookedTransformer.py Outdated Show resolved Hide resolved
demos/stable_lm.ipynb Outdated Show resolved Hide resolved
demos/stable_lm.ipynb Outdated Show resolved Hide resolved
demos/stable_lm.ipynb Outdated Show resolved Hide resolved
@ArthurConmy ArthurConmy merged commit 2223baa into TransformerLensOrg:main Jul 25, 2023
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.

[Proposal] Add Support for StableLM Base & Tuned, 3B & 7B
2 participants