qd-phi-1_5 / README.md
voidful's picture
Update README.md
4ebccff verified
metadata
language:
  - en
license: mit
datasets:
  - corbyrosset/researchy_questions

Model Summary

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, 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

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)

Result

Question Is it better to love or to be loved?

Decomposition

{
  "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