Text Generation
Transformers
PyTorch
Safetensors
English
Sparrow
endpoints
text-generation-inference
custom_code
Instructions to use ManishThota/CustomModel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ManishThota/CustomModel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ManishThota/CustomModel", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ManishThota/CustomModel", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ManishThota/CustomModel with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ManishThota/CustomModel" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ManishThota/CustomModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ManishThota/CustomModel
- SGLang
How to use ManishThota/CustomModel 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 "ManishThota/CustomModel" \ --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": "ManishThota/CustomModel", "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 "ManishThota/CustomModel" \ --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": "ManishThota/CustomModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ManishThota/CustomModel with Docker Model Runner:
docker model run hf.co/ManishThota/CustomModel
| { | |
| "_name_or_path": "ManishThota/Sparrow", | |
| "activation_function": "gelu_new", | |
| "architectures": [ | |
| "ImpForCausalLM" | |
| ], | |
| "attn_pdrop": 0.0, | |
| "auto_map": { | |
| "AutoConfig": "configuration_imp.ImpConfig", | |
| "AutoModelForCausalLM": "modeling_imp.ImpForCausalLM" | |
| }, | |
| "embd_pdrop": 0.0, | |
| "eos_token_id": 50295, | |
| "flash_attn": false, | |
| "flash_rotary": false, | |
| "freeze_mm_mlp_adapter": false, | |
| "fused_dense": false, | |
| "image_aspect_ratio": "square", | |
| "image_token": "<image>", | |
| "image_token_index": 50296, | |
| "img_processor": null, | |
| "initializer_range": 0.02, | |
| "layer_norm_epsilon": 1e-05, | |
| "mm_hidden_size": 1152, | |
| "mm_projector_lr": 2e-05, | |
| "mm_projector_type": "mlp2x_gelu", | |
| "mm_use_im_patch_token": false, | |
| "mm_use_im_start_end": false, | |
| "mm_vision_select_feature": "patch", | |
| "mm_vision_select_layer": -2, | |
| "mm_vision_tower": "google/siglip-so400m-patch14-384", | |
| "model_type": "Sparrow", | |
| "n_embd": 2560, | |
| "n_head": 32, | |
| "n_head_kv": null, | |
| "n_inner": null, | |
| "n_layer": 32, | |
| "n_positions": 3072, | |
| "pad_token_id": 50256, | |
| "resid_pdrop": 0.1, | |
| "rotary_dim": 32, | |
| "tie_word_embeddings": false, | |
| "tokenizer_model_max_length": 3072, | |
| "tokenizer_padding_side": "right", | |
| "torch_dtype": "float16", | |
| "transformers_version": "4.31.0", | |
| "tune_mm_mlp_adapter": false, | |
| "use_cache": true, | |
| "use_mm_proj": true, | |
| "vision_tower_config": { | |
| "attention_dropout": 0.0, | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 1152, | |
| "image_size": 384, | |
| "intermediate_size": 4304, | |
| "layer_norm_eps": 1e-06, | |
| "model_type": "siglip_vision_model", | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 27, | |
| "patch_size": 14 | |
| }, | |
| "vocab_size": 51200 | |
| } | |