Instructions to use gem-search/GEM-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gem-search/GEM-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="gem-search/GEM-4B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("gem-search/GEM-4B", trust_remote_code=True) model = AutoModel.from_pretrained("gem-search/GEM-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload modeling_gem.py with huggingface_hub
Browse files- modeling_gem.py +1 -0
modeling_gem.py
CHANGED
|
@@ -314,6 +314,7 @@ class GEM(PreTrainedModel, GenerationMixin):
|
|
| 314 |
show_progress_bar=show_progress_bar,
|
| 315 |
convert_to_tensor=convert_to_tensor,
|
| 316 |
instruction=instruction,
|
|
|
|
| 317 |
return_generation=return_generation,
|
| 318 |
**generation_kwargs,
|
| 319 |
)
|
|
|
|
| 314 |
show_progress_bar=show_progress_bar,
|
| 315 |
convert_to_tensor=convert_to_tensor,
|
| 316 |
instruction=instruction,
|
| 317 |
+
prompt=prompt,
|
| 318 |
return_generation=return_generation,
|
| 319 |
**generation_kwargs,
|
| 320 |
)
|