Text Generation
Transformers
PyTorch
Arabic
t5
text2text-generation
text2text
Classification and Generation
Classification
Generation
ArabicT5
Text Classification
Text2Text Generation
text-generation-inference
Instructions to use Hezam/ArabicT5-49GB-small-classification-generation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hezam/ArabicT5-49GB-small-classification-generation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Hezam/ArabicT5-49GB-small-classification-generation")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Hezam/ArabicT5-49GB-small-classification-generation") model = AutoModelForSeq2SeqLM.from_pretrained("Hezam/ArabicT5-49GB-small-classification-generation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Hezam/ArabicT5-49GB-small-classification-generation with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hezam/ArabicT5-49GB-small-classification-generation" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hezam/ArabicT5-49GB-small-classification-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Hezam/ArabicT5-49GB-small-classification-generation
- SGLang
How to use Hezam/ArabicT5-49GB-small-classification-generation 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 "Hezam/ArabicT5-49GB-small-classification-generation" \ --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": "Hezam/ArabicT5-49GB-small-classification-generation", "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 "Hezam/ArabicT5-49GB-small-classification-generation" \ --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": "Hezam/ArabicT5-49GB-small-classification-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Hezam/ArabicT5-49GB-small-classification-generation with Docker Model Runner:
docker model run hf.co/Hezam/ArabicT5-49GB-small-classification-generation
basic training
Browse files- config.json +7 -6
- pytorch_model.bin +2 -2
config.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/content/drive/MyDrive/
|
| 3 |
"architectures": [
|
| 4 |
"T5ForConditionalGeneration"
|
| 5 |
],
|
|
|
|
| 6 |
"d_ff": 2048,
|
| 7 |
"d_kv": 64,
|
| 8 |
"d_model": 512,
|
|
@@ -13,19 +14,19 @@
|
|
| 13 |
"feed_forward_proj": "relu",
|
| 14 |
"initializer_factor": 1.0,
|
| 15 |
"is_encoder_decoder": true,
|
| 16 |
-
"is_gated_act":
|
| 17 |
"layer_norm_epsilon": 1e-06,
|
| 18 |
"model_type": "t5",
|
| 19 |
-
"
|
| 20 |
-
"num_decoder_layers": 20,
|
| 21 |
"num_heads": 8,
|
| 22 |
-
"num_layers":
|
| 23 |
"output_past": true,
|
| 24 |
"pad_token_id": 0,
|
| 25 |
"relative_attention_max_distance": 128,
|
| 26 |
"relative_attention_num_buckets": 32,
|
|
|
|
| 27 |
"torch_dtype": "float32",
|
| 28 |
"transformers_version": "4.26.1",
|
| 29 |
"use_cache": true,
|
| 30 |
-
"vocab_size":
|
| 31 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/content/drive/MyDrive/news/model2",
|
| 3 |
"architectures": [
|
| 4 |
"T5ForConditionalGeneration"
|
| 5 |
],
|
| 6 |
+
"classifier_dropout": 0.0,
|
| 7 |
"d_ff": 2048,
|
| 8 |
"d_kv": 64,
|
| 9 |
"d_model": 512,
|
|
|
|
| 14 |
"feed_forward_proj": "relu",
|
| 15 |
"initializer_factor": 1.0,
|
| 16 |
"is_encoder_decoder": true,
|
| 17 |
+
"is_gated_act": true,
|
| 18 |
"layer_norm_epsilon": 1e-06,
|
| 19 |
"model_type": "t5",
|
| 20 |
+
"num_decoder_layers": 16,
|
|
|
|
| 21 |
"num_heads": 8,
|
| 22 |
+
"num_layers": 16,
|
| 23 |
"output_past": true,
|
| 24 |
"pad_token_id": 0,
|
| 25 |
"relative_attention_max_distance": 128,
|
| 26 |
"relative_attention_num_buckets": 32,
|
| 27 |
+
"tie_word_embeddings": false,
|
| 28 |
"torch_dtype": "float32",
|
| 29 |
"transformers_version": "4.26.1",
|
| 30 |
"use_cache": true,
|
| 31 |
+
"vocab_size": 32128
|
| 32 |
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06d6968e89d7cdf95af815e8dfb947c49865de30e830d504becbd207f20d4939
|
| 3 |
+
size 735875429
|