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
Training in progress, step 200, checkpoint
Browse filesFiles changed (11)
- last-checkpoint/config.jsonAdded+29
- last-checkpoint/generation_config.jsonAdded+6
- last-checkpoint/model.safetensorsAdded+3
- last-checkpoint/optimizer.ptAdded+3
- last-checkpoint/rng_state.pthAdded+3
- last-checkpoint/scheduler.ptAdded+3
- last-checkpoint/special_tokens_map.jsonAdded+41
- last-checkpoint/tokenizer.jsonAdded
- last-checkpoint/tokenizer_config.jsonAdded+154
- last-checkpoint/trainer_state.jsonAdded+32
- last-checkpoint/training_args.binAdded+3
1234567891011121314151617181920212223242526272829{ "architectures": [ "LlamaForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 1, "eos_token_id": 2, "head_dim": 64, "hidden_act": "silu", "hidden_size": 256, "initializer_range": 0.02, "intermediate_size": 688, "max_position_embeddings": 64, "mlp_bias": false, "model_type": "llama", "num_attention_heads": 4, "num_hidden_layers": 12, "num_key_value_heads": 2, "pretraining_tp": 1, "rms_norm_eps": 1e-06, "rope_scaling": null, "rope_theta": 10000.0, "tie_word_embeddings": false, "torch_dtype": "float32", "transformers_version": "4.46.2", "use_cache": true, "vocab_size": 32769}123456{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": 2, "transformers_version": "4.46.2"}123version https://git-lfs.github.com/spec/v1oid sha256:1436d9b9a57e3644525cd8f3eead4c83d5a44197178b2ffbac9f6936dc12bb0esize 101948208123version https://git-lfs.github.com/spec/v1oid sha256:374fd9dc1899ca82806ba0c1db1420dd199c18f18e5a6108070cc650888bd8e9size 203962810123version https://git-lfs.github.com/spec/v1oid sha256:1bb8daa2218f661aab713b5c8d6a88cb76f435e9067862f52676baa950ad6801size 13990123version https://git-lfs.github.com/spec/v1oid sha256:9a142aa43981914cdee586e70e41eaed085aa9fd9c984fa06e0add7238c43bfbsize 10641234567891011121314151617181920212223242526272829303132333435363738394041{ "additional_special_tokens": [ "<user>", "<assistant>" ], "bos_token": { "content": "<sos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "<end_of_sen>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "mask_token": { "content": "<mask>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154{ "added_tokens_decoder": { "0": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "<sos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "3": { "content": "<end_of_sen>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "4": { "content": "<user>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "5": { "content": "<assistant>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "6": { "content": "0", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "7": { "content": "1", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "8": { "content": "2", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "9": { "content": "3", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "10": { "content": "4", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "11": { "content": "5", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "12": { "content": "6", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "13": { "content": "7", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "14": { "content": "8", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "15": { "content": "9", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32768": { "content": "<mask>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [ "<user>", "<assistant>" ], "bos_token": "<sos>", "clean_up_tokenization_spaces": false, "eos_token": "<end_of_sen>", "mask_token": "<mask>", "model_max_length": 1000000000000000019884624838656, "pad_token": "<pad>", "padding_side": "left", "tokenizer_class": "PreTrainedTokenizerFast", "truncation_side": "right", "unk_token": "<unk>"}1234567891011121314151617181920212223242526272829303132{ "best_metric": null, "best_model_checkpoint": null, "epoch": 0.0029703999643552006, "eval_steps": 500, "global_step": 200, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [], "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": 10503271219200.0, "train_batch_size": 4, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:dfc5ef191448be70d7be891b8b0093fe711bdcce08e851f668b6c540f166cbb9size 5240last-checkpoint/config.jsonAdded+29
last-checkpoint/generation_config.jsonAdded+6
last-checkpoint/model.safetensorsAdded+3
last-checkpoint/optimizer.ptAdded+3
last-checkpoint/rng_state.pthAdded+3
last-checkpoint/scheduler.ptAdded+3
last-checkpoint/special_tokens_map.jsonAdded+41
last-checkpoint/tokenizer.jsonAdded
last-checkpoint/tokenizer_config.jsonAdded+154
last-checkpoint/trainer_state.jsonAdded+32
last-checkpoint/training_args.binAdded+3