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

Update modal example #1111

Merged
merged 5 commits into from
Aug 29, 2024
Merged

Update modal example #1111

merged 5 commits into from
Aug 29, 2024

Conversation

cpfiffer
Copy link
Contributor

I updated some of the text of the modal example to add more information on what's happening where, since Modal's general structure may be unfamiliar to new users.

List of changes:

  • Removed version constraints on the image. I think this is a questionable choice so I'd love input -- in general, this should probably better be addressed by versioning the docs Version the documentation #999. There's an open PR Version the Documentation #1059 here that can help with this too -- I'm happy to revert to pinned versions, or at least update to the current version of outlines (0.0.46).
  • Added a brief note that the Mistral model is gated and requires you to request access on HuggingFace.
  • Moved the environment variable setting from import_model to a .env call when the image is created. This is more idiomatic Modal code. It was previously addressed in Documentation: Fix failing Modal example #1058, but this should be more current.
  • More comments and prep.

Copy link
Member

@rlouf rlouf left a comment

Choose a reason for hiding this comment

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

Great! Just one minor comment.

docs/cookbook/deploy-using-modal.md Outdated Show resolved Hide resolved
@cpfiffer
Copy link
Contributor Author

Addressed the comments here -- any other comments?

@charlesfrye
Copy link

Removed version constraints on the image. I think this is a questionable choice so I'd love input -- in general, this should probably better be addressed by versioning the docs #999. There's an open PR
#1059 here that can help with this too -- I'm happy to revert to pinned versions, or at least update to the current version of outlines (0.0.46).

We generally pin to improve the stability of our examples. But you'll notice we don't pin Modal versions, because we expect to handle any issues that our own code changes cause. Makes sense for you to do the same!

Added a brief note that the Mistral model is gated and requires you to request access on HuggingFace.

I have mostly moved over to using forks or finetunes of gated models that are not themselves gated, e.g. from NousResearch, to avoid this bit of friction.

@charlesfrye
Copy link

Re: non-gated versions of models.

I made that change to our version in this commit. Note that the mistral-community organization on Hugging Face includes their CEO, clem, as a member, so while it's "unofficial" it's not jank.

- use ungated model
- add sentencepiece dependency
@cpfiffer
Copy link
Contributor Author

Great, good idea! I added the ungated Mistral model, which also required a sentencepiece dependency. Added that too.

## Build the image

First we need to define our container image. We download the Mistral-7B-v0.1 model from HuggingFace as part of the definition of the image so it only needs to be done once (you need to provide an [access token](https://huggingface.co/settings/tokens))
First we need to define our container image. We download the Mistral-7B-v0.1 model from HuggingFace as part of the definition of the image so it only needs to be done once (you need to provide an [access token](https://huggingface.co/settings/tokens)).
Copy link
Member

Choose a reason for hiding this comment

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

I guess we don't need this now?

@rlouf rlouf merged commit 067aedb into dottxt-ai:main Aug 29, 2024
7 checks passed
@rlouf rlouf added examples Linked to usage examples documentation Linked to documentation and examples labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Linked to documentation and examples examples Linked to usage examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants