Instructions to use AyoubChLin/Albert-bbc-news with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AyoubChLin/Albert-bbc-news with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="AyoubChLin/Albert-bbc-news")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("AyoubChLin/Albert-bbc-news") model = AutoModelForSequenceClassification.from_pretrained("AyoubChLin/Albert-bbc-news", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from AyoubChLin/Albert-bbc-news: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/AyoubChLin/Albert-bbc-news/resolve/refs%2Fpr%2F1/config.json
- Command line
-
hf download hf://AyoubChLin/Albert-bbc-news@refs/pr/1/config.json
-
curl -L -o config.json https://huggingface.co/AyoubChLin/Albert-bbc-news/resolve/refs%2Fpr%2F1/config.json
1.22 kB
| { | |
| "_name_or_path": "AutoTrain", | |
| "_num_labels": 5, | |
| "architectures": [ | |
| "AlbertForSequenceClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0, | |
| "bos_token_id": 2, | |
| "classifier_dropout_prob": 0.1, | |
| "down_scale_factor": 1, | |
| "embedding_size": 128, | |
| "eos_token_id": 3, | |
| "gap_size": 0, | |
| "hidden_act": "gelu_new", | |
| "hidden_dropout_prob": 0, | |
| "hidden_size": 4096, | |
| "id2label": { | |
| "0": "tech", | |
| "1": "business", | |
| "2": "sport", | |
| "3": "entertainment", | |
| "4": "politics" | |
| }, | |
| "initializer_range": 0.02, | |
| "inner_group_num": 1, | |
| "intermediate_size": 16384, | |
| "id2label": { | |
| "0": "tech", | |
| "1": "business", | |
| "2": "sport", | |
| "3": "entertainment", | |
| "4": "politics" | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "layers_to_keep": [], | |
| "max_length": 512, | |
| "max_position_embeddings": 512, | |
| "model_type": "albert", | |
| "net_structure_type": 0, | |
| "num_attention_heads": 64, | |
| "num_hidden_groups": 1, | |
| "num_hidden_layers": 12, | |
| "num_memory_blocks": 0, | |
| "pad_token_id": 0, | |
| "padding": "max_length", | |
| "position_embedding_type": "absolute", | |
| "problem_type": "single_label_classification", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.25.1", | |
| "type_vocab_size": 2, | |
| "vocab_size": 30000 | |
| } | |