yellowvanilla commited on
Commit
5eef6bf
·
1 Parent(s): 367267d
Files changed (1) hide show
  1. README.md +28 -14
README.md CHANGED
@@ -1,7 +1,11 @@
1
  ---
2
- metrics:
3
- - accuracy
4
- library_name: adapter-transformers
 
 
 
 
5
  ---
6
  # Model Card for Model ID
7
 
@@ -42,17 +46,27 @@ Base on ChatGLM2-6B. This model is used to assist in the Sustainability of const
42
 
43
  [More Information Needed]
44
 
45
- ```python
46
- import torch
47
- from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
48
- tokenizer = AutoTokenizer.from_pretrained("kkkgg/Chat-SCW", use_fast=False)
49
- model = AutoModelForCausalLM.from_pretrained("stabilityai/StableBeluga2", torch_dtype=torch.float16, low_cpu_mem_usage=True, device_map="auto")
50
- system_prompt = "### System:\nYou are an AI that assists me in my analysis of carbon reduction in buildings.\n\n"
51
- message = "Explan the life cycle stages"
52
- prompt = f"{system_prompt}### User: {message}\n\n### Assistant:\n"
53
- inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
54
- output = model.generate(**inputs, do_sample=True, top_p=0.95, top_k=0, max_new_tokens=256)
55
- print(tokenizer.decode(output[0], skip_special_tokens=True))
 
 
 
 
 
 
 
 
 
 
56
  ```
57
 
58
  ### Downstream Use [optional]
 
1
  ---
2
+ language:
3
+ - zh
4
+ - en
5
+ tags:
6
+ - glm
7
+ - chatglm
8
+ - thudm
9
  ---
10
  # Model Card for Model ID
11
 
 
46
 
47
  [More Information Needed]
48
 
49
+ ```ipython
50
+ >>> from transformers import AutoTokenizer, AutoModel
51
+ >>> tokenizer = AutoTokenizer.from_pretrained("kkkgg/Chat-SCW", trust_remote_code=True)
52
+ >>> model = AutoModel.from_pretrained("kkkgg/Chat-SCW", trust_remote_code=True).half().cuda()
53
+ >>> model = model.eval()
54
+ >>> response, history = model.chat(tokenizer, "Hello", history=[])
55
+ >>> print(response)
56
+ Hello! How can I assist you today?
57
+ >>> response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=history)
58
+ >>> print(response)
59
+ The life cycle stages of a build system encompass the entire life of a construction product or service. These stages encompass the following stages:
60
+ Material extraction and processing
61
+ Manufacturing and processing
62
+ Distribution and transportation
63
+ End-of-life and disposal
64
+ Construction and renovation
65
+ Refurbishment and repair
66
+ Maintenance and repair
67
+ Renewal and replacement of components
68
+ End-of-life and disposal
69
+ It is important to note that some stages may overlap or be interconnected, and the specific stages involved may vary depending on the type of construction product or service.
70
  ```
71
 
72
  ### Downstream Use [optional]