Instructions to use Yellow-AI-NLP/komodo-7b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yellow-AI-NLP/komodo-7b-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yellow-AI-NLP/komodo-7b-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Yellow-AI-NLP/komodo-7b-base") model = AutoModelForCausalLM.from_pretrained("Yellow-AI-NLP/komodo-7b-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Yellow-AI-NLP/komodo-7b-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yellow-AI-NLP/komodo-7b-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yellow-AI-NLP/komodo-7b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Yellow-AI-NLP/komodo-7b-base
- SGLang
How to use Yellow-AI-NLP/komodo-7b-base 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 "Yellow-AI-NLP/komodo-7b-base" \ --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": "Yellow-AI-NLP/komodo-7b-base", "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 "Yellow-AI-NLP/komodo-7b-base" \ --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": "Yellow-AI-NLP/komodo-7b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Yellow-AI-NLP/komodo-7b-base with Docker Model Runner:
docker model run hf.co/Yellow-AI-NLP/komodo-7b-base
weird response when using vllm
#3
by raihan2345 - opened
I'm using vllm to infer komodo model but I got a weird response.
prompt:
Candi borobudur adalah
response:
salahsatudaridelapan candiyang ada diindonesia. Candi borobudursendiriberada di magelang, jawatengah, diIndonesia
Candi borobudurmemilikitinggi 34,2 meter danpanjang 51 meter. Terdapatjuga 3,4juta ukirandalam candi borobudur. Disekitar candi borobudurjugaterdapat sebuhtaman.
Pada abad ke sembilanatau sebelas masehi, candi borobudurmerupakansebuah candiyangmemiliki kuil. Di kuilnyaterdapatberbagai relief dan arca.Namun candi borobudurrusakolehgempa ditahun1117 Masehi.
Sejaktahun1911, candi borobudurmulai di bangunkembali. Candi borobudursendiriselesaidibangunpadatahun1923 Masehi.
Awalnya candi borobudur dibuatuntuktempat berdoabagiumat budha.Namunsekarang candi borobudurbukanhanyauntukumat budhamelainkan paraumatagamalainnyapundapat berdoa di candi borobudur.
Ada sejutaceritayang ada di candi borobudur. Candi borobudursendiritidaklahpernah di isukanolehsiapapun.Akhirnya,muncullahbanyakceritayangberedar dimasyarakat.
Padasalahsatubagian,terdapatkisah romansaantara tentarayang disebutKurawadengan Arimbi.Padakisahtersebut, tentaraKurawa menyerang 2orangdaridaerah Bharata.Keduaorangtersebutadalah Rama dan Shinta.Mereka menyerang Rama dan Shinta dikarenakan Rama dan Shintaterlalu romantis.
Akhirnya tentaraKurawa menantangakan dikalahkanjikaingin menikahi Arimbi.Akhirnya Rama dan Shintamaukalahkan tentaraKurawa.Merekapunkalahkan tentaraKurawadengantanpamenggunakansenjata.
Darikisah romansatersebut, di bangunlahsebuah candiyang berbentukbunga.Akhirnya,terdapat 2 candi di manasalahsatunya berbentuk candiKurawayang di isukanoleh tentara dan candi Arimbiyang di isukanoleh Rama dan Shinta.
Hi @raihan2345 , thanks for trying Komodo! Wondering, did you pass --trust-remote-code as True when initializing in vLLM?
I did, this is my command:
python -u -m vllm.entrypoints.openai.api_server \
--host 0.0.0.0 \
--port 8030 \
--model Yellow-AI-NLP/komodo-7b-base \
--tensor-parallel-size 1 \
--gpu-memory-utilization 0.9 \
--trust-remote-code
*I used vllm version 0.3.2