Edit model card

Model Card for dynamofl/multilingual-e5-large-instruct__safety__June-17

Model Details

Model Description

This model was trained for the financial_advice task using the following data and hyperparameters:

- Model: dynamofl/multilingual-e5-large-instruct__safety__June-17
- Dataset: dynamofl/train-default-FSI-PersonalFinancialAdvice-input-12-06
- Number of epochs: 2
- Batch size: 8
- Learning rate: 2e-05
- Max sequence length: 4096
- Optimizer: Paged AdamW 32-bit
- Gradient accumulation steps: 1
- Gradient checkpointing: True
- Max gradient norm: 0.3
- Warmup ratio: 0.03
- LR scheduler: Constant
- Seed: 3407
- Eval steps: 300

- Class labels
    - unsafe
    - safe

Policy Template

No policy template is used for this model, only the prompt is used as input.

Chat Template

This model uses no policy template, only the prompt as input.

Example Usage

To use this model for inference, you can use a pipeline:

from transformers import pipeline
device = "cuda"
classifier = pipeline("text-classification", model=dynamofl/multilingual-e5-large-instruct__safety__June-17-financial_advice-June-18, device=device)
print(classifier("Hey there, how are you ?"))

or alternatively you can load it using the AutoModelForSequenceClassification class from the transformers library:

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

model_name = "dynamofl/multilingual-e5-large-instruct__safety__June-17-financial_advice-June-18"
device = "cuda"
model = AutoModelForCausalLM.from_pretrained(model_name, device_map=device, dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained(model_name)
inputs_ids = tokenizer("Hey there, how are you ?", adding="max_length", truncation=True, return_tensors="pt")
model_inputs = {
    'attention_mask': inputs['attention_mask'].to(device),
    'input_ids': inputs['input_ids'].to(device)
}
outputs = model(**model_inputs)
with torch.no_grad():
    output = self.model(**inputs)
predicted_class_id = torch.argmax(output.logits, dim=-1).cuda()
if hasattr(model.config, "id2label"):
    predicted_label = [model.config.id2label[pcid] for pcid in predicted_class_id.tolist()]
else:
    predicted_label = predicted_class_id
print(predicted_label)

Limitations and Potential Bias

  • The model's performance may be biased based on the training data used.

  • The model may generate inappropriate or offensive content for certain inputs.

  • The model's knowledge cutoff is based on the training data and may not be up to date.

  • Developed by: James O' Neill | Santhosh Subramanian | Eric Lin | David Chen

  • Funded by [optional]: [More Information Needed]

  • Shared by [optional]: [More Information Needed]

  • Model type: [More Information Needed]

  • Language(s) (NLP): en

  • License: other

  • Finetuned from model [optional]: [More Information Needed]

Model Sources [optional]

Uses

Direct Use

[More Information Needed]

Downstream Use [optional]

[More Information Needed]

Out-of-Scope Use

[More Information Needed]

Bias, Risks, and Limitations

[More Information Needed]

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

How to Get Started with the Model

Use the code below to get started with the model.

[More Information Needed]

Training Details

Training Data

[More Information Needed]

Training Procedure

Preprocessing [optional]

[More Information Needed]

Training Hyperparameters

  • Training regime: [More Information Needed]

Speeds, Sizes, Times [optional]

[More Information Needed]

Evaluation

Testing Data, Factors & Metrics

Testing Data

[More Information Needed]

Factors

[More Information Needed]

Metrics

[More Information Needed]

Results

[More Information Needed]

Summary

Model Examination [optional]

[More Information Needed]

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: [More Information Needed]
  • Hours used: [More Information Needed]
  • Cloud Provider: [More Information Needed]
  • Compute Region: [More Information Needed]
  • Carbon Emitted: [More Information Needed]

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

[More Information Needed]

Software

[More Information Needed]

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]

Downloads last month
0
Safetensors
Model size
560M params
Tensor type
F32
·
Unable to determine this model’s pipeline type. Check the docs .