Text Generation
Transformers
Safetensors
mistral
text-generation-inference
unsloth
trl
gammacorpus
geneva
chat
conversational
Instructions to use rubenroy/Geneva-12B-GCv2-1m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rubenroy/Geneva-12B-GCv2-1m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rubenroy/Geneva-12B-GCv2-1m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rubenroy/Geneva-12B-GCv2-1m") model = AutoModelForCausalLM.from_pretrained("rubenroy/Geneva-12B-GCv2-1m", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rubenroy/Geneva-12B-GCv2-1m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rubenroy/Geneva-12B-GCv2-1m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rubenroy/Geneva-12B-GCv2-1m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rubenroy/Geneva-12B-GCv2-1m
- SGLang
How to use rubenroy/Geneva-12B-GCv2-1m 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 "rubenroy/Geneva-12B-GCv2-1m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rubenroy/Geneva-12B-GCv2-1m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "rubenroy/Geneva-12B-GCv2-1m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rubenroy/Geneva-12B-GCv2-1m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use rubenroy/Geneva-12B-GCv2-1m with Docker Model Runner:
docker model run hf.co/rubenroy/Geneva-12B-GCv2-1m
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,22 +1,127 @@
|
|
| 1 |
---
|
| 2 |
-
base_model:
|
| 3 |
tags:
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
-
- mistral
|
| 8 |
- trl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
| 11 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
-
- **License:** apache-2.0
|
| 18 |
-
- **Finetuned from model :** unsloth/mistral-nemo-instruct-2407-bnb-4bit
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: mistralai/Mistral-Nemo-Instruct-2407
|
| 3 |
tags:
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
|
|
|
| 7 |
- trl
|
| 8 |
+
- gammacorpus
|
| 9 |
+
- geneva
|
| 10 |
+
- chat
|
| 11 |
+
- mistral
|
| 12 |
+
- conversational
|
| 13 |
license: apache-2.0
|
| 14 |
language:
|
| 15 |
- en
|
| 16 |
+
- fr
|
| 17 |
+
- de
|
| 18 |
+
- es
|
| 19 |
+
- it
|
| 20 |
+
- pt
|
| 21 |
+
- ru
|
| 22 |
+
- zh
|
| 23 |
+
- ja
|
| 24 |
+
datasets:
|
| 25 |
+
- rubenroy/GammaCorpus-v2-1m
|
| 26 |
+
pipeline_tag: text-generation
|
| 27 |
+
library_name: transformers
|
| 28 |
---
|
| 29 |
|
| 30 |
+

|
| 31 |
+
|
| 32 |
+
# Geneva 12B GammaCorpus v2-1m
|
| 33 |
+
*A Mistral NeMo model fine-tuned on the GammaCorpus dataset*
|
| 34 |
+
|
| 35 |
+
## Overview
|
| 36 |
+
Geneva 12B GammaCorpus v2-1m is a fine-tune of Mistral's **Mistral Nemo Instruct 2407** model. Geneva is designed to outperform other models that have a similar size while also showcasing [GammaCorpus v2-1m](https://huggingface.co/datasets/rubenroy/GammaCorpus-v2-1m).
|
| 37 |
+
|
| 38 |
+
## Model Details
|
| 39 |
+
- **Base Model:** [mistralai/Mistral-Nemo-Instruct-2407](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407)
|
| 40 |
+
- **Parameters:** 12B
|
| 41 |
+
- **Layers:** 40
|
| 42 |
+
- **Dim:** 5,120
|
| 43 |
+
- **Head dim:** 128
|
| 44 |
+
- **Hidden dim:** 14,336
|
| 45 |
+
- **Activation Function:** SwiGLU
|
| 46 |
+
- **Number of heads:** 32
|
| 47 |
+
- **Number of kv-heads:** 8 (GQA)
|
| 48 |
+
- **Vocabulary size:** 2**17 ~= 128k
|
| 49 |
+
- **Rotary embeddings (theta = 1M)**
|
| 50 |
+
|
| 51 |
+
## Training Details
|
| 52 |
+
|
| 53 |
+
Geneva-12B-GCv2-1m underwent fine-tuning with 1 A100 GPU for ~40 minutes and trained with the [Unsloth](https://unsloth.ai/) framework. Geneva-12B-GCv2-1m was trained for **60 Epochs**.
|
| 54 |
+
|
| 55 |
+
## Usage
|
| 56 |
+
|
| 57 |
+
### Requirements
|
| 58 |
+
|
| 59 |
+
Please use the following Transformers version here:
|
| 60 |
+
|
| 61 |
+
```
|
| 62 |
+
pip install git+https://github.com/huggingface/transformers.git
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
### Quickstart
|
| 66 |
+
|
| 67 |
+
If you want to use Hugging Face `transformers` to generate text, you can do something like this:
|
| 68 |
+
|
| 69 |
+
```python
|
| 70 |
+
from transformers import pipeline
|
| 71 |
+
|
| 72 |
+
prompt = "How tall is the Eiffel tower?"
|
| 73 |
+
|
| 74 |
+
messages = [
|
| 75 |
+
{"role": "system", "content": "You are a helpful assistant named Geneva, built on the Mistral NeMo model developed by Mistral AI, and fine-tuned by Ruben Roy."},
|
| 76 |
+
{"role": "user", "content": prompt},
|
| 77 |
+
]
|
| 78 |
+
|
| 79 |
+
infer = pipeline("text-generation", model="rubenroy/Geneva-12B-GCv2-1m", max_new_tokens=128)
|
| 80 |
+
|
| 81 |
+
infer(messages)
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
## About GammaCorpus
|
| 85 |
+
|
| 86 |
+
This model, and all Geneva models, are trained with GammaCorpus. GammaCorpus is a dataset on HuggingFace that is filled with structured and filtered multi-turn conversations.
|
| 87 |
+
GammaCorpus has 4 version with different sizes in each. These are the following versions and sizes:
|
| 88 |
+
|
| 89 |
+
### GammaCorpus v1
|
| 90 |
+
- 10k UNFILTERED
|
| 91 |
+
- 50k UNFILTERED
|
| 92 |
+
- 70k UNFILTERED
|
| 93 |
+
|
| 94 |
+
Here is a link to the GCv1 dataset collection:<br>
|
| 95 |
+
https://huggingface.co/collections/rubenroy/gammacorpus-v1-67935e4e52a04215f15a7a60
|
| 96 |
+
|
| 97 |
+
### GammaCorpus v2
|
| 98 |
+
- 10k
|
| 99 |
+
- 50k
|
| 100 |
+
- 100k
|
| 101 |
+
- 500k
|
| 102 |
+
- **1m <-- This is the version of GammaCorpus v2 that the Geneva model you are using was trained on.**
|
| 103 |
+
- 5m
|
| 104 |
+
|
| 105 |
+
Here is a link to the GCv2 dataset collection:<br>
|
| 106 |
+
https://huggingface.co/collections/rubenroy/gammacorpus-v2-67935e895e1259c404a579df
|
| 107 |
+
|
| 108 |
+
### GammaCorpus CoT
|
| 109 |
+
- Math 170k
|
| 110 |
+
|
| 111 |
+
Here is a link to the GC-CoT dataset collection:<br>
|
| 112 |
+
https://huggingface.co/collections/rubenroy/gammacorpus-cot-6795bbc950b62b1ced41d14f
|
| 113 |
+
|
| 114 |
+
### GammaCorpus QA
|
| 115 |
+
- Fact 450k
|
| 116 |
+
|
| 117 |
+
Here is a link to the GC-QA dataset collection:<br>
|
| 118 |
+
https://huggingface.co/collections/rubenroy/gammacorpus-qa-679857017bb3855234c1d8c7
|
| 119 |
+
|
| 120 |
+
### The link to the full GammaCorpus dataset collection can be found [here](https://huggingface.co/collections/rubenroy/gammacorpus-67765abf607615a0eb6d61ac).
|
| 121 |
|
| 122 |
+
## Known Limitations:
|
|
|
|
|
|
|
| 123 |
|
| 124 |
+
- **Bias:** We have tried our best to mitigate as much bias we can, but please be aware of the possibility that the model might generate some biased answers.
|
| 125 |
|
| 126 |
+
## Licence:
|
| 127 |
+
The model is released under the **[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0)**. Please refer to the license for usage rights and restrictions.
|