Text Generation
Transformers
PyTorch
Safetensors
English
llama
text-generation-inference
unsloth
trl
sft
conversational
Instructions to use rombodawg/Llama-3-8B-Instruct-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rombodawg/Llama-3-8B-Instruct-Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rombodawg/Llama-3-8B-Instruct-Coder") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rombodawg/Llama-3-8B-Instruct-Coder") model = AutoModelForCausalLM.from_pretrained("rombodawg/Llama-3-8B-Instruct-Coder", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rombodawg/Llama-3-8B-Instruct-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rombodawg/Llama-3-8B-Instruct-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rombodawg/Llama-3-8B-Instruct-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rombodawg/Llama-3-8B-Instruct-Coder
- SGLang
How to use rombodawg/Llama-3-8B-Instruct-Coder 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/Llama-3-8B-Instruct-Coder" \ --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": "rombodawg/Llama-3-8B-Instruct-Coder", "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 "rombodawg/Llama-3-8B-Instruct-Coder" \ --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": "rombodawg/Llama-3-8B-Instruct-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use rombodawg/Llama-3-8B-Instruct-Coder with Docker Model Runner:
docker model run hf.co/rombodawg/Llama-3-8B-Instruct-Coder
Commit History
-
Update README.md
Verified signatureef91c8d
-
Update README.md
Verified signature27c1e72
-
Adding `safetensors` variant of this model (#3)
Verified signature- Adding `safetensors` variant of this model (82c84079f9ece3f40c679e3849463aad7c8ec84e) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>7d8cae3
-
Update README.md
Verified signature5412277
-
Update README.md
Verified signature6cc80b3
-
Update README.md
Verified signature5194756 -
Update README.md
Verified signature9f6461b
-
Update README.md
Verified signature34059ea -
Update README.md
Verified signature88c5655 -
Update README.md
Verified signature376a5e7 -
Update README.md
Verified signaturec09da51 -
Update README.md
Verified signature9cf7c5e -
Update README.md
Verified signature6c5ae53 -
Update README.md
Verified signature7004330 -
Update README.md
Verified signaturea027214 -
Update README.md
Verified signature54a6747 -
Trained with Unsloth
Verified signatureb3a0be5 -
Upload tokenizer
Verified signatureaf11bb0 -
Upload README.md with huggingface_hub
Verified signature209d41f -
initial commit
Verified signature4f4070c