Instructions to use sequelbox/Llama3.1-8B-PlumCode with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sequelbox/Llama3.1-8B-PlumCode with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sequelbox/Llama3.1-8B-PlumCode") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sequelbox/Llama3.1-8B-PlumCode") model = AutoModelForCausalLM.from_pretrained("sequelbox/Llama3.1-8B-PlumCode") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use sequelbox/Llama3.1-8B-PlumCode with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sequelbox/Llama3.1-8B-PlumCode" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sequelbox/Llama3.1-8B-PlumCode", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sequelbox/Llama3.1-8B-PlumCode
- SGLang
How to use sequelbox/Llama3.1-8B-PlumCode 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 "sequelbox/Llama3.1-8B-PlumCode" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sequelbox/Llama3.1-8B-PlumCode", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "sequelbox/Llama3.1-8B-PlumCode" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sequelbox/Llama3.1-8B-PlumCode", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sequelbox/Llama3.1-8B-PlumCode with Docker Model Runner:
docker model run hf.co/sequelbox/Llama3.1-8B-PlumCode
Upload folder using huggingface_hub
Upload folder using huggingface_hub
Multi commit ID: 99e0011bbb527ab8ca3feb8a08f8ff51bbb28ebdfdc1075709f2f69dadbb40a7
Scheduled commits:
- Upload 1 file(s) totalling 5.0G (993efca13784c9b3116ba844454771f2da6fecca5465de348ec18fab5ca6f1aa)
- Upload 1 file(s) totalling 5.0G (b51a6dde5aade101a431f46cc29468db2cd25dc36921299addadfd6de4b25303)
- Upload 1 file(s) totalling 4.9G (bc89393419f580f52608706f11fdf64d48b9c78b0f6367ef50ee30774e5c3d79)
- Upload 10 file(s) totalling 1.2G (db65fb70b06215128ae608f94eacfd326feec838b7d1c8ce4f7b9b3c8b7d3c42)
This is a PR opened using the huggingface_hub library in the context of a multi-commit. PR can be commented as a usual PR. However, please be aware that manually updating the PR description, changing the PR status, or pushing new commits, is not recommended as it might corrupt the commit process. Learn more about multi-commits in this guide.
Multi-commit is now completed! You can ping the repo owner to review the changes. This PR can now be commented or modified without risking to corrupt it.
This is a comment posted using the huggingface_hub library in the context of a multi-commit. Learn more about multi-commits in this guide.