Instructions to use rombodawg/LosslessMegaCoder-llama2-13b-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rombodawg/LosslessMegaCoder-llama2-13b-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rombodawg/LosslessMegaCoder-llama2-13b-mini")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rombodawg/LosslessMegaCoder-llama2-13b-mini") model = AutoModelForCausalLM.from_pretrained("rombodawg/LosslessMegaCoder-llama2-13b-mini", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rombodawg/LosslessMegaCoder-llama2-13b-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-13b-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-13b-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rombodawg/LosslessMegaCoder-llama2-13b-mini
- SGLang
How to use rombodawg/LosslessMegaCoder-llama2-13b-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-13b-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-13b-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-13b-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-13b-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rombodawg/LosslessMegaCoder-llama2-13b-mini with Docker Model Runner:
docker model run hf.co/rombodawg/LosslessMegaCoder-llama2-13b-mini
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
| 1 |
---
|
| 2 |
license: other
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
+
datasets:
|
| 4 |
+
- rombodawg/LosslessMegaCodeTrainingV2_1m_Evol_Uncensored
|
| 5 |
---
|
| 6 |
+
This is one of the first models trained on the LosslessMegaCodeTrainingV2_1m_Evol_Uncensored dataset. The version of the dataset used for this model was poorly filtered on some loose parameters that arent anything to write home about but plans for much more refined filtering are in the works
|
| 7 |
+
|
| 8 |
+
- This model was made as a colaboration between me and andreaskoepf who is an affiliate of Open Assistant.
|
| 9 |
+
|
| 10 |
+
### Prompt template
|
| 11 |
+
|
| 12 |
+
[chatml](https://github.com/openai/openai-python/blob/main/chatml.md) format is used:
|
| 13 |
+
"<|im_start|>system\n{system message}<|im_end|>\n<|im_start|>user\n{user prompt}<|im_end|>\n<|im_start|>assistant\n{Assistant answer}<|im_end|>\n"
|
| 14 |
+
|
| 15 |
+
multi-line:
|
| 16 |
+
|
| 17 |
+
```
|
| 18 |
+
<|im_start|>system
|
| 19 |
+
{system message}<|im_end|>
|
| 20 |
+
<|im_start|>user
|
| 21 |
+
{user prompt}<|im_end|>
|
| 22 |
+
<|im_start|>assistant
|
| 23 |
+
{Assistant answer}<|im_end|>
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
The link for the full dataset is bellow:
|
| 27 |
+
|
| 28 |
+
- https://huggingface.co/datasets/rombodawg/LosslessMegaCodeTrainingV2_1m_Evol_Uncensored
|
| 29 |
+
|
| 30 |
+
Link for the filtered dataset used to make this model are bellow:
|
| 31 |
+
|
| 32 |
+
- https://huggingface.co/datasets/andreaskoepf/megacode2-min100
|
| 33 |
+
|
| 34 |
+
The original posting for this model was uploaded at the link bellow.
|
| 35 |
+
|
| 36 |
+
- https://huggingface.co/andreaskoepf/llama2-13b-megacode2_min100
|