Code Monkey home page Code Monkey logo

norbench's People

Contributors

akutuzov avatar annapalarkina171 avatar davda54 avatar egilron avatar erikve avatar jerbarnes avatar liljao avatar sigdelina avatar tollefj avatar vmkhlv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

norbench's Issues

CUDA out-of-memory again

After merging #18, we again face CUDA out-of-memory errors. The data is loaded successfully, the LM is also loaded, the training attempts to start, and then:
RuntimeError: CUDA out of memory. Tried to allocate 12.00 MiB (GPU 0; 23.70 GiB total capacity; 1.10 GiB already allocated; 10.56 MiB free; 1.18 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

This happens even with extremely small batch sizes and even on GPUs with 24GB and more RAM. This is the command I am running:
python3 norbench_run.py --path_to_model XXX --task sentiment --task_specific_info sentence --model_name XXX --batch_size 2 --epochs 5

I tried again with the (now deleted) sentiment_analysis/finetuning.py script:
python3 finetuning.py -level sentence -model XXX -batch_size 16 -epochs 5
It works like a charm on the same data, same hardware and same set of Python modules.

Thus, obviously something is wrong with some calls in the norbench_run.py script. Please fix it.

Missing license

Hi!
Was just wondering if there's any open-source license that applies to the code in the repo
or if it was a conscious decision to leave one out.
I understand that different licenses apply to the different datasets in the repo. Perhaps it could be listed in the readme?
It would be nice to know what we can and can't do with the code

XLM-R model for tasks in the NorBench

The current issue provides the information about implementing XLM-R for the tasks mentioned below:

  1. Part-of-Speech tagging Bokmål
  2. Part-of-Speech tagging Nynorsk
  3. Binary sentiment analysis
  4. Named entity recognition Bokmål
  5. Named entity recognition Nynorsk

Norwegian Wordnet Bokmål. Models

This issue provides information about the baseline and models that have been tested on the data of the Wordnet from the Norwegian National Library.

Models that have already been tested for provided data:

  1. Most frequent sense baseline (with the using of Norbert2)

  2. A number of tests with different input data on Norbert2, Multilingual Bert (12 models are evaluated by the moment)

Other tests are in the process of implementation.

Update TSA-finetuning script

Planned updates for TSA evaluation script:

  • Put trust_remote_code in model_args
  • Pull dataset from Huggingface in stead of local copy
  • Put all needed helper functions and classes into the tsa_finetuning script

After this, tsa_finetuning.py should not depend on any other files in the repo.

except ner_eval which also is used by the NER script

Training and evaluation of autoregressive / GPT-style language models

Hi!

I'm currently researching open LLMs for Norwegian, and since a lot of SOTA solutions nowadays are based on scaling up
GPT-style causal LM models and fine-tune them on instructions, I think it would make sense to have
some evaluation and fine-tuning scripts and metrics for these types of models too.

I've already made a fork where I'm working on this myself, but I'm wondering:

  1. Is this something that is already being looked into?
  2. If not, could a contribution to this main repo be desirable?

Evaluating for all tasks crashes

Running evaluation on all tasks crashes on the very first one with:

Traceback (most recent call last):
  File "norbench/evaluation_scripts/all_tasks.py", line 134, in <module>
    run_models_for_current_task(do_train, tsk, name_sub_info, path_tsk, run_name, model_identifier, epochs, use_seqeval_evaluation_for_ner, use_class_weights_for_sent)
  File "norbench/evaluation_scripts/all_tasks.py", line 82, in run_models_for_current_task
    run_tasks(do_train, current_task, name_sub_info, data_path, model_identifier, run_name, epochs, use_seqeval_evaluation_for_ner, use_class_weights_for_sent)
  File "norbench/evaluation_scripts/all_tasks.py", line 55, in run_tasks
    dev_score =  tasks[current_task]['eval'](data_path, "dev", sub_task_info=name_sub_info, short_model_name=model_identifier, task=current_task)
  File "norbench/evaluation_scripts/pos_finetuning.py", line 37, in test
    test_lang_path = data_path + task
TypeError: unsupported operand type(s) for +: 'bool' and 'str'

The command is
python3 all_tasks.py --path_to_model MODEL --task all --download_cur_data True --model_name IDENTIFIER

Norbench updates

The current issue provides information about the models that have been implemented within the framework of Norbench.

The information provided below will contain:

  • documentation for running scripts for the current (POS-tagging, Binary Sentiment Analysis, NER) task
  • list of models that can be used for each of the tasks (at the current moment)
  • future updates, new available models, etc.

Downloading datasets in all_tasks script does not work?

The download_cur_data argument in the all_tasks.py script behaves a bit weirdly.

  1. A user reasonably expects it's enough to simply append --download_cur_data to the command, and the datasets will be downloaded automatically. Instead, the script crashes with
    all_tasks.py: error: argument --download_cur_data: expected one argument

  2. If instead --download_cur_data True is used, the script still crashes, this time with

File "all_tasks.py", line 120, in <module>
    raise Exception(f'Check paths "{path_tsk}" to data for {tsk} task')
Exception: Check paths "" to data for pos task

I believe boolean arguments should be implemented with BooleanOptionalAction.

Norwegian Wordnet Bokmål. Statistics

This issue contains information about statistics in the Norwegian Wordnet (Bokmål) from the National Norwegian Library.

At the initial stage, statistics was made on the official dataset from the National Library in general, showing distribution of number of examples, pos tags, and senses per lemma.

At this stage, more detailed statistics are carried out, including the following points:

  1. the statistics of distribution of unique sentences for the given lemma: choice was concentrated on lemmas that could provided 5 or more sentences through the dataset.

  2. it is proposed to divide words into categories depending on the number of possible senses.

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.