Instructions to use I042/bert-base-arabert-finetuned-wikitext2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use I042/bert-base-arabert-finetuned-wikitext2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="I042/bert-base-arabert-finetuned-wikitext2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("I042/bert-base-arabert-finetuned-wikitext2") model = AutoModelForCausalLM.from_pretrained("I042/bert-base-arabert-finetuned-wikitext2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use I042/bert-base-arabert-finetuned-wikitext2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "I042/bert-base-arabert-finetuned-wikitext2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "I042/bert-base-arabert-finetuned-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/I042/bert-base-arabert-finetuned-wikitext2
- SGLang
How to use I042/bert-base-arabert-finetuned-wikitext2 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 "I042/bert-base-arabert-finetuned-wikitext2" \ --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": "I042/bert-base-arabert-finetuned-wikitext2", "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 "I042/bert-base-arabert-finetuned-wikitext2" \ --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": "I042/bert-base-arabert-finetuned-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use I042/bert-base-arabert-finetuned-wikitext2 with Docker Model Runner:
docker model run hf.co/I042/bert-base-arabert-finetuned-wikitext2
Training in progress, step 500
Browse files
config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "aubmindlab/bert-base-arabert",
|
| 3 |
"architectures": [
|
| 4 |
-
"
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"classifier_dropout": null,
|
|
@@ -23,6 +23,7 @@
|
|
| 23 |
"pooler_size_per_head": 128,
|
| 24 |
"pooler_type": "first_token_transform",
|
| 25 |
"position_embedding_type": "absolute",
|
|
|
|
| 26 |
"transformers_version": "4.44.2",
|
| 27 |
"type_vocab_size": 2,
|
| 28 |
"use_cache": true,
|
|
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "aubmindlab/bert-base-arabert",
|
| 3 |
"architectures": [
|
| 4 |
+
"BertLMHeadModel"
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"classifier_dropout": null,
|
|
|
|
| 23 |
"pooler_size_per_head": 128,
|
| 24 |
"pooler_type": "first_token_transform",
|
| 25 |
"position_embedding_type": "absolute",
|
| 26 |
+
"torch_dtype": "float32",
|
| 27 |
"transformers_version": "4.44.2",
|
| 28 |
"type_vocab_size": 2,
|
| 29 |
"use_cache": true,
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5cdd7560962fb170b23c8f6c9791b2bec915355b3dab98c0395f5018175d921b
|
| 3 |
+
size 541059232
|
runs/Sep12_07-16-57_014d06935856/events.out.tfevents.1726125424.014d06935856.413.2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97ebd5f867430db10b72be861e07941c35987b986012ea9a7601c8d34094c1da
|
| 3 |
+
size 5338
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:845758394a8a07130414d2968bdbc8a1ba7ff11e22eb6473bbf12eb553cc40f3
|
| 3 |
+
size 5240
|