Text Generation
Transformers
Safetensors
Arabic
gemma3
image-text-to-text
arabic
nlp
text-segmentation
semantic-chunking
lora
unsloth
fine-tuned
rag
information-retrieval
conversational
text-generation-inference
Instructions to use marioVIC/arabic-semantic-chunking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marioVIC/arabic-semantic-chunking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marioVIC/arabic-semantic-chunking") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("marioVIC/arabic-semantic-chunking") model = AutoModelForMultimodalLM.from_pretrained("marioVIC/arabic-semantic-chunking", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use marioVIC/arabic-semantic-chunking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marioVIC/arabic-semantic-chunking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marioVIC/arabic-semantic-chunking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marioVIC/arabic-semantic-chunking
- SGLang
How to use marioVIC/arabic-semantic-chunking 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 "marioVIC/arabic-semantic-chunking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marioVIC/arabic-semantic-chunking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "marioVIC/arabic-semantic-chunking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marioVIC/arabic-semantic-chunking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use marioVIC/arabic-semantic-chunking with Docker Model Runner:
docker model run hf.co/marioVIC/arabic-semantic-chunking
Upload model trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- adapter_config.json +4 -4
- adapter_model.safetensors +1 -1
adapter_config.json
CHANGED
|
@@ -33,13 +33,13 @@
|
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
| 36 |
-
"up_proj",
|
| 37 |
"o_proj",
|
|
|
|
|
|
|
| 38 |
"gate_proj",
|
| 39 |
-
"k_proj",
|
| 40 |
"v_proj",
|
| 41 |
-
"
|
| 42 |
-
"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
|
|
|
| 36 |
"o_proj",
|
| 37 |
+
"up_proj",
|
| 38 |
+
"q_proj",
|
| 39 |
"gate_proj",
|
|
|
|
| 40 |
"v_proj",
|
| 41 |
+
"down_proj",
|
| 42 |
+
"k_proj"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 131252288
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0af23d2f56497e79abbdc34fd098805cfc7048d79eef674e91c6f39570e2ca1a
|
| 3 |
size 131252288
|