Zurich 14B GammaCorpus v2-1m is a fine-tune of Alibaba's
Qwen 2.5 14B Instruct model. Zurich is designed to outperform other models that have a similar size while also showcasing
GammaCorpus v2-1m.
Zurich-14B-GCv2-1m underwent fine-tuning with 1 A100 GPU for ~70 minutes and trained with the
Unsloth framework. Zurich-14B-GCv2-1m was trained for
60 Epochs.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "rubenroy/Zurich-14B-GCv2-1m"
4
5model = AutoModelForCausalLM.from_pretrained(
6 model_name,
7 torch_dtype="auto",
8 device_map="auto"
9)
10tokenizer = AutoTokenizer.from_pretrained(model_name)
11
12prompt = "How tall is the Eiffel tower?"
13messages = [
14 {"role": "system", "content": "You are Zurich, an AI assistant built on the Qwen 2.5 14B model developed by Alibaba Cloud, and fine-tuned by Ruben Roy. You are a helpful assistant."},
15 {"role": "user", "content": prompt}
16]
17text = tokenizer.apply_chat_template(
18 messages,
19 tokenize=False,
20 add_generation_prompt=True
21)
22model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
23
24generated_ids = model.generate(
25 **model_inputs,
26 max_new_tokens=512
27)
28generated_ids = [
29 output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
30]
31
32response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
This model, and all Zurich 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:
The model is released under the
Apache 2.0 License. Please refer to the license for usage rights and restrictions.