phi-2-LC / README.md
telodigoensergio's picture
Update README.md
f49735a verified
|
raw
history blame
7.18 kB
metadata
library_name: transformers
datasets:
  - telodigoensergio/lc-gpt3.5
language:
  - es

Model Card for Model ID

Este modelo es el primer paso hacia un modelo de lenguaje que pueda usarse para reescribir de textos de carácter adminsitrativo con el objetivo de mejorar su comprensión para personas con alto y bajo nivel cultural y socieconómico.

Model Description

El modelo es el resultado de un proceso de ajuste fino de phi-2, desarrollado por microsoft con unos 2.5b de parámetros. Para el ajuste se han extraído multitud de textos de índole administrativa de las principales páginas web de la administración del Estado español.

Para la carga y ajuste del modelo se han utilizado técnicas de cuantización con la siguiente configuración:

bnb_config = BitsAndBytesConfig(load_in_4bit=True,
                                bnb_4bit_quant_type='nf4',
                                bnb_4bit_compute_dtype='float16',
                                bnb_4bit_use_double_quant=True)

y se ha aplicado LoRA a las capas lineales para el fine-tunning:

config = LoraConfig(
    r=16,
    lora_alpha=32,
    target_modules=[
    'q_proj',
    'k_proj',
    'v_proj',
    'dense',
    'fc1',
    'fc2',
    ], #print(model) will show the modules to use
    bias="none",
    lora_dropout=0.05,
    task_type="CAUSAL_LM",

Parámetros de entrenamiento

Para el entrenamiento se utilizaron los siguientes parámetros:

training_args = TrainingArguments(
    output_dir='./results', 
    overwrite_output_dir=True, 
    per_device_train_batch_size=2,  
    per_device_eval_batch_size=2,  
    gradient_accumulation_steps=5, 
    gradient_checkpointing=True,   
    gradient_checkpointing_kwargs={"use_reentrant": False},
    warmup_steps=50,  
    #max_steps=1000,  
    num_train_epochs=2, 
    learning_rate=5e-5,  
    weight_decay=0.01, 
    optim="paged_adamw_8bit", 
    fp16=True, 
    logging_dir='./logs',
    logging_strategy="steps",
    logging_steps=100,
    save_strategy="steps",
    save_steps=200,
    save_total_limit=2, 
    evaluation_strategy="steps",
    eval_steps=200,
    load_best_model_at_end=True, 
)

Prompting

El prompt para el uso sigue la siguiente estructura:

prompt = f"""###System:
Lee el siguiente texto y hazlo más claro:
###Texto:

{texto}

###Texto aclarado:
"""
  • Developed by: Sergio Chicón
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Model type: [More Information Needed]
  • Language(s) (NLP): [More Information Needed]
  • License: [More Information Needed]
  • Finetuned from model: Microsoft/phi-2

Model Sources

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]