Text Generation
Transformers
PyTorch
Safetensors
English
Bengali
mpt
custom_code
text-generation-inference
Instructions to use hishab/titulm-mpt-1b-v2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hishab/titulm-mpt-1b-v2.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hishab/titulm-mpt-1b-v2.0", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hishab/titulm-mpt-1b-v2.0", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("hishab/titulm-mpt-1b-v2.0", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hishab/titulm-mpt-1b-v2.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hishab/titulm-mpt-1b-v2.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hishab/titulm-mpt-1b-v2.0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hishab/titulm-mpt-1b-v2.0
- SGLang
How to use hishab/titulm-mpt-1b-v2.0 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 "hishab/titulm-mpt-1b-v2.0" \ --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": "hishab/titulm-mpt-1b-v2.0", "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 "hishab/titulm-mpt-1b-v2.0" \ --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": "hishab/titulm-mpt-1b-v2.0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hishab/titulm-mpt-1b-v2.0 with Docker Model Runner:
docker model run hf.co/hishab/titulm-mpt-1b-v2.0
Commit History
Update README.md 1c25dff verified
Add library_name and link to code (#2) f3b48a7 verified
Update README.md bedfa50 verified
Update README.md 81d2404 verified
Update README.md b0cfa33 verified
Update README.md 75ad42e verified
Update README.md 7db8b74 verified
Update README.md 4c7d348 verified
Update README.md 4faf0a6 verified
Update README.md a9187db verified
Update README.md a9e2a24 verified
Update README.md c28c1ea verified
Update README.md 44d2a6f verified
Update README.md e83a1c6 verified
Update README.md 00df691 verified
Update README.md 02b9d98 verified
Update README.md c2604aa verified
add model files and scripts c905252
sagorbrur commited on