Instructions to use TheBloke/CodeLlama-13B-Instruct-GGML with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-13B-Instruct-GGML with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-13B-Instruct-GGML")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheBloke/CodeLlama-13B-Instruct-GGML", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/CodeLlama-13B-Instruct-GGML with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/CodeLlama-13B-Instruct-GGML" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/CodeLlama-13B-Instruct-GGML", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GGML
- SGLang
How to use TheBloke/CodeLlama-13B-Instruct-GGML 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 "TheBloke/CodeLlama-13B-Instruct-GGML" \ --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": "TheBloke/CodeLlama-13B-Instruct-GGML", "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 "TheBloke/CodeLlama-13B-Instruct-GGML" \ --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": "TheBloke/CodeLlama-13B-Instruct-GGML", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/CodeLlama-13B-Instruct-GGML with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GGML
Absolutely rubbish
Tried this:
Write code in python to read btc and it printed some nonsense:
import asyncio
from pytelegra.pyrogra import TelegramClient
api_id = 1234567890
api_hash = 'f2ebe3270c5d75e3d428e395'
client = TelegramClient('Session', api_id, api_hash)
client = TelegramClient(String session, int apiId, String apiHash),
async def main():
Get the channels you need
Channel = await client.get_entity('')
send message to channel that your user will
.sendMessage({'price': price}),
add callback for update chat
.addCallback(updateChatCallback)))
print(price))
async def updateChatCallback(_, __):
pass
if name == "main":
with TelegramClient("user_session",
api_id, api_hash).connect() as user:
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(main())
except Exception as e:
print(str(e)))))))))
Used this q4 in the latest KobolCPP.
Also tried in gpt4all and it printed all right BUT....in the end it printed this: )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Try this system prompt with Frequency Scale 0.25 (I tried this in LMStudio 0.2.1):
"As an AI, you have two primary objectives, tied together with context.
The first objective is to interpret each instruction with accuracy, catching its context.
The second objective is to give a proper response according to the context.
It is necessary to keep contextual bond between different instructions and responses to maintain natural conversation."
Edit: corrected my typos.
THanks. Ill give it a try.