vishnun / lora-NLIGraph

huggingface.co
Total runs: 3
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: July 27 2023
token-classification

Introduction of lora-NLIGraph

Model Details of lora-NLIGraph

Training procedure
  • Used PEFT library from huggingface and leveraged LoRA procedure to tune the model. Below are the training metrics.
Epoch Training Loss Validation Loss Precision Recall F1 Accuracy
1 0.392600 0.347941 0.762406 0.631506 0.690810 0.882263
2 0.336300 0.302746 0.775583 0.702650 0.737317 0.897062
3 0.309500 0.294454 0.817472 0.701828 0.755249 0.905303
4 0.296700 0.281895 0.839335 0.695757 0.760831 0.905240
5 0.281700 0.273324 0.816995 0.752103 0.783207 0.914322
6 0.257300 0.262116 0.813662 0.758553 0.785142 0.915958
7 0.241200 0.255580 0.819946 0.764308 0.791150 0.918980
8 0.229900 0.255078 0.819697 0.771074 0.794643 0.919821
9 0.212800 0.248312 0.830942 0.776450 0.802772 0.922594
10 0.200900 0.245995 0.831402 0.780244 0.805011 0.923544
  • Model got shrunk by nearly 60 times and with the same efficiency as distilbert-base-uncased
Inference

from transformers import AutoTokenizer, AutoModel
from peft import get_peft_config, PeftModel, PeftConfig, get_peft_model, LoraConfig, TaskType

peft_model_id = "vishnun/lora-NLIGraph"
config = PeftConfig.from_pretrained(peft_model_id)
inference_model = AutoModelForTokenClassification.from_pretrained(
    config.base_model_name_or_path, num_labels=4, id2label=id2lab, label2id=lab2id
)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
model = PeftModel.from_pretrained(inference_model, peft_model_id)

text = "Arsenal will win the Premier League"
inputs = tokenizer(text, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

tokens = inputs.tokens()
predictions = torch.argmax(logits, dim=2)

for token, prediction in zip(tokens, predictions[0].numpy()):
    print((token, model.config.id2label[prediction]))

## results : ('<s>', 'O')
('Arsenal', 'SRC')
('Ġwill', 'O')
('Ġwin', 'REL')
('Ġthe', 'O')
('ĠPremier', 'TGT')
('ĠLeague', 'O')
('</s>', 'O')
Framework versions
  • PEFT 0.4.0

Runs of vishnun lora-NLIGraph on huggingface.co

3
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About lora-NLIGraph huggingface.co Model

More lora-NLIGraph license Visit here:

https://choosealicense.com/licenses/mit

lora-NLIGraph huggingface.co

lora-NLIGraph huggingface.co is an AI model on huggingface.co that provides lora-NLIGraph's model effect (), which can be used instantly with this vishnun lora-NLIGraph model. huggingface.co supports a free trial of the lora-NLIGraph model, and also provides paid use of the lora-NLIGraph. Support call lora-NLIGraph model through api, including Node.js, Python, http.

lora-NLIGraph huggingface.co Url

https://huggingface.co/vishnun/lora-NLIGraph

vishnun lora-NLIGraph online free

lora-NLIGraph huggingface.co is an online trial and call api platform, which integrates lora-NLIGraph's modeling effects, including api services, and provides a free online trial of lora-NLIGraph, you can try lora-NLIGraph online for free by clicking the link below.

vishnun lora-NLIGraph online free url in huggingface.co:

https://huggingface.co/vishnun/lora-NLIGraph

lora-NLIGraph install

lora-NLIGraph is an open source model from GitHub that offers a free installation service, and any user can find lora-NLIGraph on GitHub to install. At the same time, huggingface.co provides the effect of lora-NLIGraph install, users can directly use lora-NLIGraph installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

lora-NLIGraph install url in huggingface.co:

https://huggingface.co/vishnun/lora-NLIGraph

Url of lora-NLIGraph

lora-NLIGraph huggingface.co Url

Provider of lora-NLIGraph huggingface.co

vishnun
ORGANIZATIONS

Other API from vishnun

huggingface.co

Total runs: 2.5K
Run Growth: -365
Growth Rate: -14.58%
Updated:August 04 2023
huggingface.co

Total runs: 0
Run Growth: -3
Growth Rate: 0.00%
Updated:January 09 2023