Instructions to use Zaid/ashaar_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zaid/ashaar_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Zaid/ashaar_model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Zaid/ashaar_model") model = AutoModelForCausalLM.from_pretrained("Zaid/ashaar_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Zaid/ashaar_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Zaid/ashaar_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zaid/ashaar_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Zaid/ashaar_model
- SGLang
How to use Zaid/ashaar_model 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 "Zaid/ashaar_model" \ --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": "Zaid/ashaar_model", "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 "Zaid/ashaar_model" \ --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": "Zaid/ashaar_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Zaid/ashaar_model with Docker Model Runner:
docker model run hf.co/Zaid/ashaar_model
| {"<|endoftext|>":0,"<|psep|>":1,"</|psep|>":2,"<|vsep|>":3,"<|bsep|>":4,"</|bsep|>":5,"<|pad|>":6,"<|meter_0|>":7,"<|meter_1|>":8,"<|meter_2|>":9,"<|meter_3|>":10,"<|meter_4|>":11,"<|meter_5|>":12,"<|meter_6|>":13,"<|meter_7|>":14,"<|meter_8|>":15,"<|meter_9|>":16,"<|meter_10|>":17,"<|meter_11|>":18,"<|meter_12|>":19,"<|meter_13|>":20,"<|meter_14|>":21,"<|meter_15|>":22,"<|meter_16|>":23,"<|theme_0|>":24,"<|theme_1|>":25,"<|theme_2|>":26,"<|theme_3|>":27,"<|theme_4|>":28,"<|theme_5|>":29,"<|theme_6|>":30,"<|theme_7|>":31,"<|theme_8|>":32,"<|theme_9|>":33,"<|theme_10|>":34,"<|theme_11|>":35,"<|theme_12|>":36,"<|theme_13|>":37,"<|theme_14|>":38,"<|theme_15|>":39,"<|theme_16|>":40,"<|theme_17|>":41,"<|theme_18|>":42,"<|res_0|>":43,"<|res_1|>":44,"<|res_2|>":45,"<|res_3|>":46,"<|res_4|>":47,"<|res_5|>":48,"<|res_6|>":49,"<|res_7|>":50,"<|res_8|>":51,"<|res_9|>":52," ":53,"/":54,"0":55,"1":56,"2":57,"3":58,"4":59,"5":60,"6":61,"7":62,"8":63,"9":64,"<":65,">":66,"_":67,"b":68,"e":69,"h":70,"m":71,"p":72,"r":73,"s":74,"t":75,"v":76,"|":77,"~":78,"ء":79,"أ":80,"ؤ":81,"ئ":82,"ا":83,"ب":84,"ة":85,"ت":86,"ث":87,"ج":88,"ح":89,"خ":90,"د":91,"ذ":92,"ر":93,"ز":94,"س":95,"ش":96,"ص":97,"ض":98,"ط":99,"ظ":100,"ع":101,"غ":102,"ف":103,"ق":104,"ك":105,"ل":106,"م":107,"ن":108,"ه":109,"و":110,"ى":111,"ي":112,"ً":113,"ٌ":114,"ٍ":115,"َ":116,"ُ":117,"ِ":118,"ّ":119,"ْ":120} |