Giter Site home page Giter Site logo

ric's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿซ I'm a grad student at Department of Computer Science and Engineering, HKUST.
  • ๐Ÿ”ฌ mainly study Machine Learning and Reinforcment Learning.

ric's People

Contributors

yangrui2015 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tingchenfu

ric's Issues

ValueError: too many dimensions 'str' when running eval_rewarded_soups.py

I meet error

File "/.../python3.10/site-packages/transformers/tokenization_utils_base.py", line 748, in convert_to_tensors
   tensor = as_tensor(value)
File "/.../python3.10/site-packages/transformers/tokenization_utils_base.py", line 720, in as_tensor
    return torch.tensor(value)
ValueError: too many dimensions 'str'

when running eval_rewarded_soups.py. And this issue didn't happen when running eval_ppo_single_model.py.

It should be fixed by adding

valid_batch_size = 1
valid_dataset = valid_dataset.remove_columns(['prompt', 'query'])
for key in ['key', 'text', 'response']:
    if key in valid_dataset.column_names:
        valid_dataset = valid_dataset.remove_columns(key)

Is this correct?

Questions on dataset processing

In ric/utils.py line 223, I guess the sample["input_ids"] = tokenizer.encode(sample["text"]) should be sample["input_ids"] = tokenizer.encode(sample["prompt"]) instead.

A question on plot.py

Why should the pref_list be reversed?

if 'helpful' in path and 'humor' in path:
        if reverse:
            obtained_scores = obtained_scores[:, ::-1]
        if len(pref_lis):
            pref_lis = [1 - x for x in pref_lis]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.