diegi97 commited on
Commit
f60a446
·
1 Parent(s): 1dc67ca

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -15
README.md CHANGED
@@ -35,7 +35,7 @@ prompt = "<|prompt|>How are you?</s><|answer|>"
35
  ## Summary
36
 
37
  This model was trained using [H2O LLM Studio](https://github.com/h2oai/h2o-llmstudio).
38
- - Base model: [openlm-research/open_llama_13b](https://huggingface.co/openlm-research/open_llama_13b)
39
  - Dataset preparation: [OpenAssistant/oasst1](https://github.com/h2oai/h2o-llmstudio/blob/1935d84d9caafed3ee686ad2733eb02d2abfce57/app_utils/utils.py#LL1896C5-L1896C28) personalized
40
 
41
 
@@ -54,7 +54,7 @@ import torch
54
  from transformers import pipeline
55
 
56
  generate_text = pipeline(
57
- model="h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-13b",
58
  torch_dtype="auto",
59
  trust_remote_code=True,
60
  use_fast=False,
@@ -92,13 +92,13 @@ from h2oai_pipeline import H2OTextGenerationPipeline
92
  from transformers import AutoModelForCausalLM, AutoTokenizer
93
 
94
  tokenizer = AutoTokenizer.from_pretrained(
95
- "h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-13b",
96
  use_fast=False,
97
  padding_side="left",
98
  trust_remote_code=True,
99
  )
100
  model = AutoModelForCausalLM.from_pretrained(
101
- "h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-13b",
102
  torch_dtype="auto",
103
  device_map={"": "cuda:0"},
104
  trust_remote_code=True,
@@ -124,7 +124,7 @@ You may also construct the pipeline from the loaded model and tokenizer yourself
124
  ```python
125
  from transformers import AutoModelForCausalLM, AutoTokenizer
126
 
127
- model_name = "h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-13b" # either local folder or huggingface model name
128
  # Important: The prompt needs to be in the same format the model was trained with.
129
  # You can find an example prompt in the experiment logs.
130
  prompt = "<|prompt|>How are you?</s><|answer|>"
@@ -165,20 +165,20 @@ print(answer)
165
  ```
166
  LlamaForCausalLM(
167
  (model): LlamaModel(
168
- (embed_tokens): Embedding(32000, 5120, padding_idx=0)
169
  (layers): ModuleList(
170
- (0-39): 40 x LlamaDecoderLayer(
171
  (self_attn): LlamaAttention(
172
- (q_proj): Linear(in_features=5120, out_features=5120, bias=False)
173
- (k_proj): Linear(in_features=5120, out_features=5120, bias=False)
174
- (v_proj): Linear(in_features=5120, out_features=5120, bias=False)
175
- (o_proj): Linear(in_features=5120, out_features=5120, bias=False)
176
  (rotary_emb): LlamaRotaryEmbedding()
177
  )
178
  (mlp): LlamaMLP(
179
- (gate_proj): Linear(in_features=5120, out_features=13824, bias=False)
180
- (down_proj): Linear(in_features=13824, out_features=5120, bias=False)
181
- (up_proj): Linear(in_features=5120, out_features=13824, bias=False)
182
  (act_fn): SiLUActivation()
183
  )
184
  (input_layernorm): LlamaRMSNorm()
@@ -187,7 +187,7 @@ LlamaForCausalLM(
187
  )
188
  (norm): LlamaRMSNorm()
189
  )
190
- (lm_head): Linear(in_features=5120, out_features=32000, bias=False)
191
  )
192
  ```
193
 
 
35
  ## Summary
36
 
37
  This model was trained using [H2O LLM Studio](https://github.com/h2oai/h2o-llmstudio).
38
+ - Base model: [openlm-research/open_llama_7b](https://huggingface.co/openlm-research/open_llama_7b)
39
  - Dataset preparation: [OpenAssistant/oasst1](https://github.com/h2oai/h2o-llmstudio/blob/1935d84d9caafed3ee686ad2733eb02d2abfce57/app_utils/utils.py#LL1896C5-L1896C28) personalized
40
 
41
 
 
54
  from transformers import pipeline
55
 
56
  generate_text = pipeline(
57
+ model="h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b",
58
  torch_dtype="auto",
59
  trust_remote_code=True,
60
  use_fast=False,
 
92
  from transformers import AutoModelForCausalLM, AutoTokenizer
93
 
94
  tokenizer = AutoTokenizer.from_pretrained(
95
+ "h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b",
96
  use_fast=False,
97
  padding_side="left",
98
  trust_remote_code=True,
99
  )
100
  model = AutoModelForCausalLM.from_pretrained(
101
+ "h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b",
102
  torch_dtype="auto",
103
  device_map={"": "cuda:0"},
104
  trust_remote_code=True,
 
124
  ```python
125
  from transformers import AutoModelForCausalLM, AutoTokenizer
126
 
127
+ model_name = "h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b" # either local folder or huggingface model name
128
  # Important: The prompt needs to be in the same format the model was trained with.
129
  # You can find an example prompt in the experiment logs.
130
  prompt = "<|prompt|>How are you?</s><|answer|>"
 
165
  ```
166
  LlamaForCausalLM(
167
  (model): LlamaModel(
168
+ (embed_tokens): Embedding(32000, 4096, padding_idx=0)
169
  (layers): ModuleList(
170
+ (0-31): 32 x LlamaDecoderLayer(
171
  (self_attn): LlamaAttention(
172
+ (q_proj): Linear(in_features=4096, out_features=4096, bias=False)
173
+ (k_proj): Linear(in_features=4096, out_features=4096, bias=False)
174
+ (v_proj): Linear(in_features=4096, out_features=4096, bias=False)
175
+ (o_proj): Linear(in_features=4096, out_features=4096, bias=False)
176
  (rotary_emb): LlamaRotaryEmbedding()
177
  )
178
  (mlp): LlamaMLP(
179
+ (gate_proj): Linear(in_features=4096, out_features=11008, bias=False)
180
+ (down_proj): Linear(in_features=11008, out_features=4096, bias=False)
181
+ (up_proj): Linear(in_features=4096, out_features=11008, bias=False)
182
  (act_fn): SiLUActivation()
183
  )
184
  (input_layernorm): LlamaRMSNorm()
 
187
  )
188
  (norm): LlamaRMSNorm()
189
  )
190
+ (lm_head): Linear(in_features=4096, out_features=32000, bias=False)
191
  )
192
  ```
193