Upload folder using huggingface_hub
This commit is contained in:
123
README.md
123
README.md
@@ -1,47 +1,88 @@
|
||||
---
|
||||
license: Apache License 2.0
|
||||
|
||||
#model-type:
|
||||
##如 gpt、phi、llama、chatglm、baichuan 等
|
||||
#- gpt
|
||||
|
||||
#domain:
|
||||
##如 nlp、cv、audio、multi-modal
|
||||
#- nlp
|
||||
|
||||
#language:
|
||||
##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa
|
||||
#- cn
|
||||
|
||||
#metrics:
|
||||
##如 CIDEr、Blue、ROUGE 等
|
||||
#- CIDEr
|
||||
|
||||
#tags:
|
||||
##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他
|
||||
#- pretrained
|
||||
|
||||
#tools:
|
||||
##如 vllm、fastchat、llamacpp、AdaSeq 等
|
||||
#- vllm
|
||||
language:
|
||||
- en
|
||||
license: mit
|
||||
datasets:
|
||||
- corbyrosset/researchy_questions
|
||||
---
|
||||
### 当前模型的贡献者未提供更加详细的模型介绍。模型文件和权重,可浏览“模型文件”页面获取。
|
||||
#### 您可以通过如下git clone命令,或者ModelScope SDK来下载模型
|
||||
## Model Summary
|
||||
|
||||
SDK下载
|
||||
```bash
|
||||
#安装ModelScope
|
||||
pip install modelscope
|
||||
```
|
||||
The language model Phi-1.5 is a Transformer with **1.3 billion** parameters. It was trained using the same data sources as [phi-1](https://huggingface.co/microsoft/phi-1), augmented with a new data source that consists of various NLP synthetic texts. When assessed against benchmarks testing common sense, language understanding, and logical reasoning, Phi-1.5 demonstrates a nearly state-of-the-art performance among models with less than 10 billion parameters.
|
||||
|
||||
We've trained Microsoft Research's phi-1.5, 1.3B parameter model with question decomposition datasets.
|
||||
|
||||
## How to Use
|
||||
|
||||
Phi-1.5 has been integrated in the `transformers` version 4.37.0. If you are using a lower version, ensure that you are doing the following:
|
||||
|
||||
* When loading the model, ensure that `trust_remote_code=True` is passed as an argument of the `from_pretrained()` function.
|
||||
|
||||
The current `transformers` version can be verified with: `pip list | grep transformers`.
|
||||
|
||||
## Example
|
||||
```python
|
||||
#SDK模型下载
|
||||
from modelscope import snapshot_download
|
||||
model_dir = snapshot_download('voidful/qd-phi-1_5')
|
||||
```
|
||||
Git下载
|
||||
```
|
||||
#Git模型下载
|
||||
git clone https://www.modelscope.cn/voidful/qd-phi-1_5.git
|
||||
import torch
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
|
||||
torch.set_default_device("cuda")
|
||||
|
||||
model = AutoModelForCausalLM.from_pretrained("voidful/qd-phi-1_5",trust_remote_code=True)
|
||||
tokenizer = AutoTokenizer.from_pretrained("voidful/qd-phi-1_5", trust_remote_code=True,device_map="auto")
|
||||
|
||||
inputs = tokenizer("Is it better to love or to be loved?", return_tensors="pt", return_attention_mask=True)
|
||||
|
||||
outputs = model.generate(**inputs, max_length=1024)
|
||||
text = tokenizer.batch_decode(outputs)[0]
|
||||
print(text)
|
||||
```
|
||||
|
||||
<p style="color: lightgrey;">如果您是本模型的贡献者,我们邀请您根据<a href="https://modelscope.cn/docs/ModelScope%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5%E6%B5%81%E7%A8%8B%E6%A6%82%E8%A7%88" style="color: lightgrey; text-decoration: underline;">模型贡献文档</a>,及时完善模型卡片内容。</p>
|
||||
## Result
|
||||
*Question* Is it better to love or to be loved?
|
||||
|
||||
*Decomposition*
|
||||
```json
|
||||
{
|
||||
"What does it mean to love?": [
|
||||
"How do different philosophical, psychological, and cultural perspectives define love?",
|
||||
"What are the characteristics and types of love?",
|
||||
"How does love affect human behavior and well-being?"
|
||||
],
|
||||
"What does it mean to be loved?": [
|
||||
"How do different philosophical, psychological, and cultural perspectives define being loved?",
|
||||
"What are the characteristics and types of being loved?",
|
||||
"How does being loved affect human behavior and well-being?"
|
||||
],
|
||||
"What are the benefits and drawbacks of loving oneself?": [
|
||||
"How does loving oneself relate to self-esteem, self-acceptance, and self-care?",
|
||||
"How does loving oneself affect one's relationships with others?",
|
||||
"What are the challenges and risks of loving oneself?"
|
||||
],
|
||||
"What are the benefits and drawbacks of being loved by others?": [
|
||||
"How does being loved by others relate to social connection, belonging, and support?",
|
||||
"How does being loved by others affect one's identity, autonomy, and agency?",
|
||||
"What are the challenges and risks of being loved by others?"
|
||||
],
|
||||
"How do the concepts of loving and being loved interact and influence each other?": [
|
||||
"How do different situations and contexts affect the dynamics of love and being loved?",
|
||||
"How do different individuals and groups experience and express love and being loved differently?",
|
||||
"How do love and being loved shape and change over time?"
|
||||
],
|
||||
"How can one balance and integrate love and being loved in one's life?": [
|
||||
"What are some strategies and practices to cultivate and sustain love and being loved?",
|
||||
"What are some examples and models of healthy and unhealthy relationships with love and being loved?",
|
||||
"What are some goals and values that guide one's choices and actions regarding love and being loved?"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Queries*
|
||||
```
|
||||
definition and types of love
|
||||
definition and types of being loved
|
||||
benefits and drawbacks of loving oneself
|
||||
benefits and drawbacks of being loved by others
|
||||
interaction and influence of love and being loved
|
||||
strategies and practices to balance and integrate love and being loved
|
||||
examples and models of healthy and unhealthy relationships with love and being loved
|
||||
goals and values regarding love and being loved
|
||||
```
|
||||
Reference in New Issue
Block a user