Instructions to use rombodawg/LosslessMegaCoder-llama2-7b-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rombodawg/LosslessMegaCoder-llama2-7b-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rombodawg/LosslessMegaCoder-llama2-7b-mini")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rombodawg/LosslessMegaCoder-llama2-7b-mini") model = AutoModelForCausalLM.from_pretrained("rombodawg/LosslessMegaCoder-llama2-7b-mini", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rombodawg/LosslessMegaCoder-llama2-7b-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rombodawg/LosslessMegaCoder-llama2-7b-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rombodawg/LosslessMegaCoder-llama2-7b-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rombodawg/LosslessMegaCoder-llama2-7b-mini
- SGLang
How to use rombodawg/LosslessMegaCoder-llama2-7b-mini 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 "rombodawg/LosslessMegaCoder-llama2-7b-mini" \ --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": "rombodawg/LosslessMegaCoder-llama2-7b-mini", "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 "rombodawg/LosslessMegaCoder-llama2-7b-mini" \ --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": "rombodawg/LosslessMegaCoder-llama2-7b-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rombodawg/LosslessMegaCoder-llama2-7b-mini with Docker Model Runner:
docker model run hf.co/rombodawg/LosslessMegaCoder-llama2-7b-mini
Commit History
-
Adding Evaluation Results (#2)
- Adding Evaluation Results (8358fd28d4cc5486de90a0ab5dcb38c3ab7ab191) Co-authored-by: Open LLM Leaderboard PR Bot <leaderboard-pr-bot@users.noreply.huggingface.co>4916206
-
Update README.md
dabb348
-
Update README.md
186b105
-
Update README.md
8899427
-
Update README.md
7ceb137
-
Update README.md
9eeca79 -
Update README.md
c8a6ce5
-
Update README.md
3b900c3 -
Update README.md
2fcc6a7 -
Update README.md
52d06ba
-
Update README.md
b267cfb -
Update README.md
de375bb -
Update README.md
6d60562 -
Update README.md
d5a624d -
Update README.md
09dbf8c -
Update README.md
83bfb42 -
Update README.md
5d7ad49 -
Update README.md
cf6606d -
Upload 16 files
ad17380 -
Delete pytorch_model-00008-of-00008.bin
ac43e6e -
Upload pytorch_model-00008-of-00008.bin
f6e51bd -
Update README.md
7c378e8 -
Update README.md
beea936 -
Update README.md
eec9751 -
Update README.md
f523816 -
initial commit
14a6663