Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the config.json for Sentiment analysis model trained on Financial PhraseBank #47

Closed
oonisim opened this issue May 22, 2021 · 1 comment

Comments

@oonisim
Copy link

oonisim commented May 22, 2021

Please provide the information where to download the config.json for Sentiment analysis model trained on Financial PhraseBank

The instruction says to place a copy of config.json. The link to download the Sentiment analysis model trained on Financial PhraseBank is the bin file only, not include the config.json.

For both of these model, the workflow should be like this:

Create a directory for the model. For example: models/sentiment/
Download the model and put it into the directory you just created.
Put a copy of config.json in this same directory. <------------------------------
Call the model with .from_pretrained()

The config.json in the huggingface looks to be for TRC2.

{
  "_name_or_path": "/home/ubuntu/finbert/models/language_model/finbertTRC2",   <-----
  "architectures": [
    "BertForSequenceClassification"
  ],
  "attention_probs_dropout_prob": 0.1,
  "gradient_checkpointing": false,
  "hidden_act": "gelu",
  "hidden_dropout_prob": 0.1,
  "hidden_size": 768,
  "id2label": {
    "0": "positive",
    "1": "negative",
    "2": "neutral"
  },
  "initializer_range": 0.02,
  "intermediate_size": 3072,
  "label2id": {
    "positive": 0,
    "negative": 1,
    "neutral": 2
  },
  "layer_norm_eps": 1e-12,
  "max_position_embeddings": 512,
  "model_type": "bert",
  "num_attention_heads": 12,
  "num_hidden_layers": 12,
  "pad_token_id": 0,
  "position_embedding_type": "absolute",
  "type_vocab_size": 2,
  "vocab_size": 30522
}
@doguaraci
Copy link
Member

Hi, you can use the same config for FinBERT as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants