Instructions to use bertin-project/Gromenauer-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bertin-project/Gromenauer-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bertin-project/Gromenauer-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bertin-project/Gromenauer-7B") model = AutoModelForCausalLM.from_pretrained("bertin-project/Gromenauer-7B") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use bertin-project/Gromenauer-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bertin-project/Gromenauer-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bertin-project/Gromenauer-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bertin-project/Gromenauer-7B
- SGLang
How to use bertin-project/Gromenauer-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "bertin-project/Gromenauer-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bertin-project/Gromenauer-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "bertin-project/Gromenauer-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bertin-project/Gromenauer-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bertin-project/Gromenauer-7B with Docker Model Runner:
docker model run hf.co/bertin-project/Gromenauer-7B
Update model name
Browse files
README.md
CHANGED
|
@@ -9,13 +9,11 @@ pipeline_tag: text-generation
|
|
| 9 |
# Gromenauer-7B
|
| 10 |
|
| 11 |
<div align=center>
|
| 12 |
-
<img alt="gromenauer-7B logo" src="https://huggingface.co/bertin-project/
|
| 13 |
</div>
|
| 14 |
|
| 15 |
## Overview
|
| 16 |
-
|
| 17 |
-
gromenauer-7B is a Spanish language model designed to understand and generate high-quality Spanish text. Developed using the robust Mistral architecture, this model has been trained on an extensive literary corpus, ensuring it captures a wide range of linguistic nuances, styles, and contexts found in Spanish literature.
|
| 18 |
-
## Model Details
|
| 19 |
|
| 20 |
- **Model Type**: Mistral
|
| 21 |
- **Sequence Length**: 8192
|
|
@@ -51,10 +49,10 @@ To load the model in your project, you can use the following code:
|
|
| 51 |
from transformers import AutoModel, AutoTokenizer
|
| 52 |
|
| 53 |
# Load the tokenizer
|
| 54 |
-
tokenizer = AutoTokenizer.from_pretrained("bertin-project/
|
| 55 |
|
| 56 |
# Load the model
|
| 57 |
-
model = AutoModel.from_pretrained("bertin-project/
|
| 58 |
|
| 59 |
# Example usage
|
| 60 |
text = "Introduce aquí tu texto en español."
|
|
|
|
| 9 |
# Gromenauer-7B
|
| 10 |
|
| 11 |
<div align=center>
|
| 12 |
+
<img alt="gromenauer-7B logo" src="https://huggingface.co/bertin-project/Gromenauer-7B/resolve/main/images/gromenauer.png" width="200px">
|
| 13 |
</div>
|
| 14 |
|
| 15 |
## Overview
|
| 16 |
+
Gromenauer-7B is a Spanish language model designed to understand and generate high-quality Spanish text. Developed using the robust Mistral architecture, this model has been trained on an extensive literary corpus, ensuring it captures a wide range of linguistic nuances, styles, and contexts found in Spanish literature.## Model Details
|
|
|
|
|
|
|
| 17 |
|
| 18 |
- **Model Type**: Mistral
|
| 19 |
- **Sequence Length**: 8192
|
|
|
|
| 49 |
from transformers import AutoModel, AutoTokenizer
|
| 50 |
|
| 51 |
# Load the tokenizer
|
| 52 |
+
tokenizer = AutoTokenizer.from_pretrained("bertin-project/Gromenauer-7B")
|
| 53 |
|
| 54 |
# Load the model
|
| 55 |
+
model = AutoModel.from_pretrained("bertin-project/Gromenauer-7B")
|
| 56 |
|
| 57 |
# Example usage
|
| 58 |
text = "Introduce aquí tu texto en español."
|