Instructions to use rubenroy/Geneva-12B-GCv2-5m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rubenroy/Geneva-12B-GCv2-5m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rubenroy/Geneva-12B-GCv2-5m") 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-5m") model = AutoModelForCausalLM.from_pretrained("rubenroy/Geneva-12B-GCv2-5m") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use rubenroy/Geneva-12B-GCv2-5m 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-5m" # 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-5m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rubenroy/Geneva-12B-GCv2-5m
- SGLang
How to use rubenroy/Geneva-12B-GCv2-5m 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-5m" \ --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-5m", "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-5m" \ --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-5m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use rubenroy/Geneva-12B-GCv2-5m with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for rubenroy/Geneva-12B-GCv2-5m to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for rubenroy/Geneva-12B-GCv2-5m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for rubenroy/Geneva-12B-GCv2-5m to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="rubenroy/Geneva-12B-GCv2-5m", max_seq_length=2048, ) - Docker Model Runner
How to use rubenroy/Geneva-12B-GCv2-5m with Docker Model Runner:
docker model run hf.co/rubenroy/Geneva-12B-GCv2-5m
Geneva 12B GammaCorpus v2-5m
A Mistral NeMo model fine-tuned on the GammaCorpus dataset
Overview
Geneva 12B GammaCorpus v2-5m 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-5m.
Model Details
- Base Model: mistralai/Mistral-Nemo-Instruct-2407
- Parameters: 12B
- Layers: 40
- Dim: 5,120
- Head dim: 128
- Hidden dim: 14,336
- Activation Function: SwiGLU
- Number of heads: 32
- Number of kv-heads: 8 (GQA)
- Vocabulary size: 2**17 ~= 128k
- Rotary embeddings (theta = 1M)
Training Details
Geneva-12B-GCv2-5m underwent fine-tuning with 1 A100 GPU for ~70 minutes and trained with the Unsloth framework. Geneva-12B-GCv2-5m was trained for 60 Epochs.
Usage
Requirements
Please use the following Transformers version here:
pip install git+https://github.com/huggingface/transformers.git
Quickstart
If you want to use Hugging Face transformers to generate text, you can do something like this:
from transformers import pipeline
prompt = "How tall is the Eiffel tower?"
messages = [
{"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."},
{"role": "user", "content": prompt},
]
infer = pipeline("text-generation", model="rubenroy/Geneva-12B-GCv2-5m", max_new_tokens=128)
infer(messages)
About GammaCorpus
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. GammaCorpus has 4 version with different sizes in each. These are the following versions and sizes:
GammaCorpus v1
- 10k UNFILTERED
- 50k UNFILTERED
- 70k UNFILTERED
Here is a link to the GCv1 dataset collection:
https://huggingface.co/collections/rubenroy/gammacorpus-v1-67935e4e52a04215f15a7a60
GammaCorpus v2
- 10k
- 50k
- 100k
- 500k
- 1m
- 5m <-- This is the version of GammaCorpus v2 that the Geneva model you are using was trained on.
Here is a link to the GCv2 dataset collection:
https://huggingface.co/collections/rubenroy/gammacorpus-v2-67935e895e1259c404a579df
GammaCorpus CoT
- Math 170k
Here is a link to the GC-CoT dataset collection:
https://huggingface.co/collections/rubenroy/gammacorpus-cot-6795bbc950b62b1ced41d14f
GammaCorpus QA
- Fact 450k
Here is a link to the GC-QA dataset collection:
https://huggingface.co/collections/rubenroy/gammacorpus-qa-679857017bb3855234c1d8c7
The link to the full GammaCorpus dataset collection can be found here.
Known Limitations:
- 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.
Licence:
The model is released under the Apache 2.0 License. Please refer to the license for usage rights and restrictions.
- Downloads last month
- 28
Model tree for rubenroy/Geneva-12B-GCv2-5m
Base model
mistralai/Mistral-Nemo-Base-2407