Suparious commited on
Commit
6fa64e5
1 Parent(s): 8dd13f3

Add model card

Browse files
Files changed (1) hide show
  1. README.md +116 -0
README.md CHANGED
@@ -1,3 +1,119 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ datasets:
4
+ - berkeley-nest/Nectar
5
+ language:
6
+ - en
7
+ library_name: transformers
8
+ tags:
9
+ - reward model
10
+ - RLHF
11
+ - RLAIF
12
+ - quantized
13
+ - 4-bit
14
+ - AWQ
15
+ - text-generation
16
+ - autotrain_compatible
17
+ - endpoints_compatible
18
+ - chatml
19
+ model_creator: Nexusflow
20
+ model_name: Starling-LM-7B-beta
21
+ model_type: mistral
22
+ pipeline_tag: text-generation
23
+ inference: false
24
+ prompt_template: '<|im_start|>system
25
+
26
+ {system_message}<|im_end|>
27
+
28
+ <|im_start|>user
29
+
30
+ {prompt}<|im_end|>
31
+
32
+ <|im_start|>assistant
33
+
34
+ '
35
+ quantized_by: Suparious
36
  ---
37
+ # Nexusflow/Starling-LM-7B-beta AWQ
38
+
39
+ ## Model Summary
40
+
41
+ - **Developed by:** Banghua Zhu * , Evan Frick * , Tianhao Wu * , Hanlin Zhu, Karthik Ganesan, Wei-Lin Chiang, Jian Zhang, and Jiantao Jiao.
42
+ - **Model type:** Language Model finetuned with RLHF / RLAIF
43
+ - **License:** Apache-2.0 license under the condition that the model is not used to compete with OpenAI
44
+ - **Finetuned from model:** [Openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106) (based on [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1))
45
+
46
+ We introduce Starling-LM-7B-beta, an open large language model (LLM) trained by Reinforcement Learning from AI Feedback (RLAIF). Starling-LM-7B-beta is trained from [Openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106) with our new reward model [Nexusflow/Starling-RM-34B](https://huggingface.co/Nexusflow/Starling-RM-34B) and policy optimization method [Fine-Tuning Language Models from Human Preferences (PPO)](https://arxiv.org/abs/1909.08593).
47
+ Harnessing the power of our ranking dataset, [berkeley-nest/Nectar](https://huggingface.co/datasets/berkeley-nest/Nectar), our upgraded reward model, [Starling-RM-34B](https://huggingface.co/Nexusflow/Starling-RM-34B), and our new reward training and policy tuning pipeline, Starling-LM-7B-beta scores an improved 8.12 in MT Bench with GPT-4 as a judge. Stay tuned for our forthcoming code and paper, which will provide more details on the whole process.
48
+
49
+ ## How to use
50
+
51
+ ### Install the necessary packages
52
+
53
+ ```bash
54
+ pip install --upgrade autoawq autoawq-kernels
55
+ ```
56
+
57
+ ### Example Python code
58
+
59
+ ```python
60
+ from awq import AutoAWQForCausalLM
61
+ from transformers import AutoTokenizer, TextStreamer
62
+
63
+ model_path = "solidrust/Starling-LM-7B-beta-AWQ"
64
+ system_message = "You are Starling, incarnated as a powerful AI."
65
+
66
+ # Load model
67
+ model = AutoAWQForCausalLM.from_quantized(model_path,
68
+ fuse_layers=True)
69
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
70
+ trust_remote_code=True)
71
+ streamer = TextStreamer(tokenizer,
72
+ skip_prompt=True,
73
+ skip_special_tokens=True)
74
+
75
+ # Convert prompt to tokens
76
+ prompt_template = """\
77
+ <|im_start|>system
78
+ {system_message}<|im_end|>
79
+ <|im_start|>user
80
+ {prompt}<|im_end|>
81
+ <|im_start|>assistant"""
82
+
83
+ prompt = "You're standing on the surface of the Earth. "\
84
+ "You walk one mile south, one mile west and one mile north. "\
85
+ "You end up exactly where you started. Where are you?"
86
+
87
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
88
+ return_tensors='pt').input_ids.cuda()
89
+
90
+ # Generate output
91
+ generation_output = model.generate(tokens,
92
+ streamer=streamer,
93
+ max_new_tokens=512)
94
+
95
+ ```
96
+
97
+ ### About AWQ
98
+
99
+ 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.
100
+
101
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
102
+
103
+ It is supported by:
104
+
105
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
106
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
107
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
108
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
109
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
110
+
111
+ ## Prompt template: ChatML
112
+
113
+ ```plaintext
114
+ <|im_start|>system
115
+ {system_message}<|im_end|>
116
+ <|im_start|>user
117
+ {prompt}<|im_end|>
118
+ <|im_start|>assistant
119
+ ```