Suparious commited on
Commit
a680efb
1 Parent(s): 4f74bde

add model card

Browse files
Files changed (1) hide show
  1. README.md +115 -0
README.md ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ - mistral
6
+ - 7b
7
+ - calme
8
+ - finetuned
9
+ - quantized
10
+ - 4-bit
11
+ - AWQ
12
+ - transformers
13
+ - pytorch
14
+ - mistral
15
+ - instruct
16
+ - text-generation
17
+ - conversational
18
+ - autotrain_compatible
19
+ - endpoints_compatible
20
+ - text-generation-inference
21
+ - region:us
22
+ - finetune
23
+ - chatml
24
+ model-index:
25
+ - name: Calme-7B-Instruct-v0.9
26
+ results: []
27
+ model_name: Calme-7B-Instruct-v0.9
28
+ inference: false
29
+ model_creator: MaziyarPanahi
30
+ pipeline_tag: text-generation
31
+ quantized_by: Suparious
32
+ ---
33
+ # MaziyarPanahi/Calme-7B-Instruct-v0.9 AWQ
34
+
35
+ - Model creator: [MaziyarPanahi](https://huggingface.co/MaziyarPanahi)
36
+ - Original model: [Calme-7B-Instruct-v0.9](https://huggingface.co/MaziyarPanahi/Calme-7B-Instruct-v0.9)
37
+
38
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/5fd5e18a90b6dc4633f6d292/LzEf6vvq2qIiys-q7l9Hq.webp" width="550" />
39
+
40
+ ## Model Summary
41
+
42
+ Calme-7B is a state-of-the-art language model with 7 billion parameters, fine-tuned over high-quality datasets on top of Mistral-7B. The Calme-7B models excel in generating text that resonates with clarity, calmness, and coherence.
43
+
44
+ ## How to use
45
+
46
+ ## How to use
47
+
48
+ ### Install the necessary packages
49
+
50
+ ```bash
51
+ pip install --upgrade autoawq autoawq-kernels
52
+ ```
53
+
54
+ ### Example Python code
55
+
56
+ ```python
57
+ from awq import AutoAWQForCausalLM
58
+ from transformers import AutoTokenizer, TextStreamer
59
+
60
+ model_path = "solidrust/Calme-7B-Instruct-v0.9-AWQ"
61
+ system_message = "You are Calme, incarnated a powerful AI with everything."
62
+
63
+ # Load model
64
+ model = AutoAWQForCausalLM.from_quantized(model_path,
65
+ fuse_layers=True)
66
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
67
+ trust_remote_code=True)
68
+ streamer = TextStreamer(tokenizer,
69
+ skip_prompt=True,
70
+ skip_special_tokens=True)
71
+
72
+ # Convert prompt to tokens
73
+ prompt_template = """\
74
+ <|im_start|>system
75
+ {system_message}<|im_end|>
76
+ <|im_start|>user
77
+ {prompt}<|im_end|>
78
+ <|im_start|>assistant"""
79
+
80
+ prompt = "You're standing on the surface of the Earth. "\
81
+ "You walk one mile south, one mile west and one mile north. "\
82
+ "You end up exactly where you started. Where are you?"
83
+
84
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
85
+ return_tensors='pt').input_ids.cuda()
86
+
87
+ # Generate output
88
+ generation_output = model.generate(tokens,
89
+ streamer=streamer,
90
+ max_new_tokens=512)
91
+ ```
92
+
93
+ ### About AWQ
94
+
95
+ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
96
+
97
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
98
+
99
+ It is supported by:
100
+
101
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
102
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
103
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
104
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
105
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
106
+
107
+ ## Prompt template: ChatML
108
+
109
+ ```plaintext
110
+ <|im_start|>system
111
+ {system_message}<|im_end|>
112
+ <|im_start|>user
113
+ {prompt}<|im_end|>
114
+ <|im_start|>assistant
115
+ ```