Text Generation
Transformers
PyTorch
English
qwen2
text-generation-inference
unsloth
trl
gammacorpus
zurich
chat
conversational
Instructions to use rubenroy/Zurich-14B-GCv2-50k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rubenroy/Zurich-14B-GCv2-50k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rubenroy/Zurich-14B-GCv2-50k") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rubenroy/Zurich-14B-GCv2-50k") model = AutoModelForCausalLM.from_pretrained("rubenroy/Zurich-14B-GCv2-50k") 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/Zurich-14B-GCv2-50k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rubenroy/Zurich-14B-GCv2-50k" # 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/Zurich-14B-GCv2-50k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rubenroy/Zurich-14B-GCv2-50k
- SGLang
How to use rubenroy/Zurich-14B-GCv2-50k 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/Zurich-14B-GCv2-50k" \ --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/Zurich-14B-GCv2-50k", "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/Zurich-14B-GCv2-50k" \ --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/Zurich-14B-GCv2-50k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use rubenroy/Zurich-14B-GCv2-50k 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/Zurich-14B-GCv2-50k 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/Zurich-14B-GCv2-50k to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for rubenroy/Zurich-14B-GCv2-50k to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="rubenroy/Zurich-14B-GCv2-50k", max_seq_length=2048, ) - Docker Model Runner
How to use rubenroy/Zurich-14B-GCv2-50k with Docker Model Runner:
docker model run hf.co/rubenroy/Zurich-14B-GCv2-50k
Update README.md
Browse files
README.md
CHANGED
|
@@ -127,9 +127,12 @@ https://huggingface.co/collections/rubenroy/gammacorpus-qa-679857017bb3855234c1d
|
|
| 127 |
|
| 128 |
### The link to the full GammaCorpus dataset collection can be found [here](https://huggingface.co/collections/rubenroy/gammacorpus-67765abf607615a0eb6d61ac).
|
| 129 |
|
| 130 |
-
## Known Limitations
|
| 131 |
|
| 132 |
- **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.
|
| 133 |
|
| 134 |
-
##
|
|
|
|
|
|
|
|
|
|
| 135 |
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.
|
|
|
|
| 127 |
|
| 128 |
### The link to the full GammaCorpus dataset collection can be found [here](https://huggingface.co/collections/rubenroy/gammacorpus-67765abf607615a0eb6d61ac).
|
| 129 |
|
| 130 |
+
## Known Limitations
|
| 131 |
|
| 132 |
- **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.
|
| 133 |
|
| 134 |
+
## Additional Information
|
| 135 |
+
|
| 136 |
+
### Licensing Information
|
| 137 |
+
|
| 138 |
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.
|