agentlans / mobilebert-uncased-nli

huggingface.co
Total runs: 14
24-hour runs: 1
7-day runs: -1
30-day runs: 5
Model's Last Updated: 11월 20 2024
text-classification

Introduction of mobilebert-uncased-nli

Model Details of mobilebert-uncased-nli

mobilebert-uncased-nli

  • Base Model: google/mobilebert-uncased
  • Task: Natural Language Inference (NLI)
  • Framework: Hugging Face Transformers, Sentence Transformers

mobilebert-uncased-nli is a fine-tuned NLI model that classifies the relationship between pairs of sentences into three categories: entailment, neutral, and contradiction. It enhances the capabilities of google/mobilebert-uncased for improved performance on NLI tasks.

Intended Use

mobilebert-uncased-nli is ideal for applications requiring understanding of logical relationships between sentences, including:

  • Semantic textual similarity
  • Question answering
  • Dialogue systems
  • Content moderation
Performance

mobilebert-uncased-nli was trained on the sentence-transformers/all-nli dataset, achieving competitive results in sentence pair classification.

Performance on the MNLI matched validation set:

  • Accuracy: 0.7645
  • Precision: 0.77
  • Recall: 0.76
  • F1-score: 0.76
Training details
Training Details
  • Dataset:

  • Sampling:

    • 100 000 training samples and 10 000 evaluation samples.
  • Fine-tuning Process:

    • Custom Python script with adaptive precision training (bfloat16).
    • Early stopping based on evaluation loss.
  • Hyperparameters:

    • Learning Rate: 2e-5
    • Batch Size: 32
    • Optimizer: AdamW (weight decay: 0.01)
    • Training Duration: Up to 10 epochs
Reproducibility

To ensure reproducibility:

  • Fixed random seed: 42
  • Environment:
    • Python: 3.10.12
    • PyTorch: 2.5.1
    • Transformers: 4.44.2
Usage Instructions
Using Sentence Transformers
from sentence_transformers import CrossEncoder

model_name = "agentlans/mobilebert-uncased-nli"
model = CrossEncoder(model_name)
scores = model.predict(
    [
        ("A man is eating pizza", "A man eats something"),
        (
            "A black race car starts up in front of a crowd of people.",
            "A man is driving down a lonely road.",
        ),
    ]
)

label_mapping = ["entailment", "neutral", "contradiction"]
labels = [label_mapping[score_max] for score_max in scores.argmax(axis=1)]
print(labels)
Using Transformers Library
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model_name = "agentlans/mobilebert-uncased-nli"
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

features = tokenizer(
    [
        "A man is eating pizza",
        "A black race car starts up in front of a crowd of people.",
    ],
    ["A man eats something", "A man is driving down a lonely road."],
    padding=True,
    truncation=True,
    return_tensors="pt",
)

model.eval()
with torch.no_grad():
    scores = model(**features).logits
    label_mapping = ["entailment", "neutral", "contradiction"]
    labels = [label_mapping[score_max] for score_max in scores.argmax(dim=1)]
    print(labels)
Limitations and Ethical Considerations

mobilebert-uncased-nli may reflect biases present in the training data. Users should evaluate its performance in specific contexts to ensure fairness and accuracy.

Conclusion

mobilebert-uncased-nli offers a robust solution for NLI tasks, enhancing google/mobilebert-uncased 's capabilities with straightforward integration into existing frameworks. It aids developers in building intelligent applications that require nuanced language understanding.

Runs of agentlans mobilebert-uncased-nli on huggingface.co

14
Total runs
1
24-hour runs
-2
3-day runs
-1
7-day runs
5
30-day runs

More Information About mobilebert-uncased-nli huggingface.co Model

More mobilebert-uncased-nli license Visit here:

https://choosealicense.com/licenses/mit

mobilebert-uncased-nli huggingface.co

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

mobilebert-uncased-nli huggingface.co Url

https://huggingface.co/agentlans/mobilebert-uncased-nli

agentlans mobilebert-uncased-nli online free

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

agentlans mobilebert-uncased-nli online free url in huggingface.co:

https://huggingface.co/agentlans/mobilebert-uncased-nli

mobilebert-uncased-nli install

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

mobilebert-uncased-nli install url in huggingface.co:

https://huggingface.co/agentlans/mobilebert-uncased-nli

Url of mobilebert-uncased-nli

mobilebert-uncased-nli huggingface.co Url

Provider of mobilebert-uncased-nli huggingface.co

agentlans
ORGANIZATIONS

Other API from agentlans

huggingface.co

Total runs: 42
Run Growth: 10
Growth Rate: 23.81%
Updated:7월 18 2025
huggingface.co

Total runs: 12
Run Growth: 0
Growth Rate: 0.00%
Updated:3월 25 2025