Instructions to use quim-motger/reviewXLNet-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use quim-motger/reviewXLNet-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="quim-motger/reviewXLNet-large")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("quim-motger/reviewXLNet-large") model = AutoModelForCausalLM.from_pretrained("quim-motger/reviewXLNet-large") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use quim-motger/reviewXLNet-large with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "quim-motger/reviewXLNet-large" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "quim-motger/reviewXLNet-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/quim-motger/reviewXLNet-large
- SGLang
How to use quim-motger/reviewXLNet-large with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "quim-motger/reviewXLNet-large" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "quim-motger/reviewXLNet-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "quim-motger/reviewXLNet-large" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "quim-motger/reviewXLNet-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use quim-motger/reviewXLNet-large with Docker Model Runner:
docker model run hf.co/quim-motger/reviewXLNet-large
reviewXLNet-large
This model is a fine-tuned version of xlnet-large-cased on a large dataset of mobile app reviews. The model is designed to understand and process text from mobile app reviews, providing enhanced performance for tasks such as feature extraction, sentiment analysis, and review summarization from app reviews.
Model Details
- Model Architecture: XLNet (Generalized Autoregressive Pretraining for Language Understanding)
- Base Model:
xlnet-large-cased - Pre-training Extension: Mobile app reviews dataset
- Language: English
Dataset
The extended pre-training was performed using a diverse dataset of mobile app reviews collected from various app stores. The dataset includes reviews of different lengths, sentiments, and topics, providing a robust foundation for understanding the nuances of mobile app user feedback.
Training Procedure
The model was fine-tuned using the following parameters:
- Batch Size: 8
- Learning Rate: 3e-5
- Epochs: 1
Usage
Load the model
from transformers import XLNetTokenizer, XLNetForSequenceClassification
tokenizer = XLNetTokenizer.from_pretrained('quim-motger/reviewXLNet-large-cased')
model = XLNetForSequenceClassification.from_pretrained('quim-motger/reviewXLNet-large-cased')
Example: Sentiment Analysis
from transformers import pipeline
nlp = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
review = "This app is fantastic! I love the user-friendly interface and features."
result = nlp(review)
print(result)
# Output: [{'label': 'POSITIVE', 'score': 0.98}]
Example: Review Summarization
from transformers import pipeline
summarizer = pipeline('summarization', model=model, tokenizer=tokenizer)
long_review = "I have been using this app for a while and it has significantly improved my productivity.
The range of features is excellent, and the user interface is intuitive. However, there are occasional
bugs that need fixing."
summary = summarizer(long_review, max_length=50, min_length=25, do_sample=False)
print(summary)
# Output: [{'summary_text': 'The app has significantly improved my productivity with its excellent features and intuitive user interface. However, occasional bugs need fixing.'}]
- Downloads last month
- 6