Instructions to use madlag/albert-base-v2-squad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use madlag/albert-base-v2-squad with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="madlag/albert-base-v2-squad")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("madlag/albert-base-v2-squad") model = AutoModelForQuestionAnswering.from_pretrained("madlag/albert-base-v2-squad", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download data_args.json from madlag/albert-base-v2-squad: direct link, hf CLI and curl.
- Browser
- Download file 433 Bytes
-
https://huggingface.co/madlag/albert-base-v2-squad/resolve/main/data_args.json
- Command line
-
hf download hf://madlag/albert-base-v2-squad/data_args.json
-
curl -L -o data_args.json https://huggingface.co/madlag/albert-base-v2-squad/resolve/main/data_args.json
433 Bytes
| { | |
| "dataset_cache_dir": "dataset_cache", | |
| "dataset_config_name": null, | |
| "dataset_name": "squad", | |
| "doc_stride": 128, | |
| "max_answer_length": 30, | |
| "max_seq_length": 384, | |
| "n_best_size": 20, | |
| "null_score_diff_threshold": 0.0, | |
| "overwrite_cache": 0, | |
| "pad_to_max_length": true, | |
| "preprocessing_num_workers": null, | |
| "train_file": null, | |
| "validation_file": null, | |
| "version_2_with_negative": false | |
| } |