Instructions to use NeerjaK/Urdu_Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeerjaK/Urdu_Model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NeerjaK/Urdu_Model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NeerjaK/Urdu_Model") model = AutoModelForCausalLM.from_pretrained("NeerjaK/Urdu_Model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NeerjaK/Urdu_Model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeerjaK/Urdu_Model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeerjaK/Urdu_Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NeerjaK/Urdu_Model
- SGLang
How to use NeerjaK/Urdu_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 "NeerjaK/Urdu_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": "NeerjaK/Urdu_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 "NeerjaK/Urdu_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": "NeerjaK/Urdu_Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NeerjaK/Urdu_Model with Docker Model Runner:
docker model run hf.co/NeerjaK/Urdu_Model
Download last-checkpoint/trainer_state.json from NeerjaK/Urdu_Model: direct link, hf CLI and curl.
- Browser
- Download file 2.86 kB
-
https://huggingface.co/NeerjaK/Urdu_Model/resolve/main/last-checkpoint/trainer_state.json
- Command line
-
hf download hf://NeerjaK/Urdu_Model/last-checkpoint/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/NeerjaK/Urdu_Model/resolve/main/last-checkpoint/trainer_state.json
2.86 kB
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.08911199893065601, | |
| "eval_steps": 500, | |
| "global_step": 6000, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.007425999910888001, | |
| "grad_norm": 0.8380220532417297, | |
| "learning_rate": 0.0019985148000178222, | |
| "loss": 6.6826, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.014851999821776003, | |
| "grad_norm": 0.6577106714248657, | |
| "learning_rate": 0.001997029600035645, | |
| "loss": 6.4499, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 0.022277999732664002, | |
| "grad_norm": 0.8019107580184937, | |
| "learning_rate": 0.001995544400053467, | |
| "loss": 6.1963, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 0.029703999643552005, | |
| "grad_norm": 0.9855144619941711, | |
| "learning_rate": 0.0019940592000712897, | |
| "loss": 6.0065, | |
| "step": 2000 | |
| }, | |
| { | |
| "epoch": 0.037129999554440005, | |
| "grad_norm": 2.472318172454834, | |
| "learning_rate": 0.001992574000089112, | |
| "loss": 5.8831, | |
| "step": 2500 | |
| }, | |
| { | |
| "epoch": 0.044555999465328004, | |
| "grad_norm": 0.6294320225715637, | |
| "learning_rate": 0.0019910888001069345, | |
| "loss": 5.7816, | |
| "step": 3000 | |
| }, | |
| { | |
| "epoch": 0.05198199937621601, | |
| "grad_norm": 1.0181043148040771, | |
| "learning_rate": 0.0019896036001247567, | |
| "loss": 5.6744, | |
| "step": 3500 | |
| }, | |
| { | |
| "epoch": 0.05940799928710401, | |
| "grad_norm": 0.5348927974700928, | |
| "learning_rate": 0.0019881184001425793, | |
| "loss": 5.621, | |
| "step": 4000 | |
| }, | |
| { | |
| "epoch": 0.066833999197992, | |
| "grad_norm": 0.5739113688468933, | |
| "learning_rate": 0.0019866332001604015, | |
| "loss": 5.587, | |
| "step": 4500 | |
| }, | |
| { | |
| "epoch": 0.07425999910888001, | |
| "grad_norm": 0.6049304008483887, | |
| "learning_rate": 0.001985148000178224, | |
| "loss": 5.5283, | |
| "step": 5000 | |
| }, | |
| { | |
| "epoch": 0.08168599901976802, | |
| "grad_norm": 0.588165283203125, | |
| "learning_rate": 0.0019836628001960463, | |
| "loss": 5.4899, | |
| "step": 5500 | |
| }, | |
| { | |
| "epoch": 0.08911199893065601, | |
| "grad_norm": 0.41542890667915344, | |
| "learning_rate": 0.001982177600213869, | |
| "loss": 5.4649, | |
| "step": 6000 | |
| } | |
| ], | |
| "logging_steps": 500, | |
| "max_steps": 673310, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 10, | |
| "save_steps": 200, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 315098136576000.0, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |