Text Generation
Transformers
Safetensors
llama
trl
sft
unsloth
Generated from Trainer
conversational
text-generation-inference
Instructions to use seanmemery/CodeLlama-34b-Instruct-Shader-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use seanmemery/CodeLlama-34b-Instruct-Shader-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="seanmemery/CodeLlama-34b-Instruct-Shader-hf") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("seanmemery/CodeLlama-34b-Instruct-Shader-hf") model = AutoModelForCausalLM.from_pretrained("seanmemery/CodeLlama-34b-Instruct-Shader-hf") 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 seanmemery/CodeLlama-34b-Instruct-Shader-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "seanmemery/CodeLlama-34b-Instruct-Shader-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "seanmemery/CodeLlama-34b-Instruct-Shader-hf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/seanmemery/CodeLlama-34b-Instruct-Shader-hf
- SGLang
How to use seanmemery/CodeLlama-34b-Instruct-Shader-hf 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 "seanmemery/CodeLlama-34b-Instruct-Shader-hf" \ --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": "seanmemery/CodeLlama-34b-Instruct-Shader-hf", "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 "seanmemery/CodeLlama-34b-Instruct-Shader-hf" \ --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": "seanmemery/CodeLlama-34b-Instruct-Shader-hf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use seanmemery/CodeLlama-34b-Instruct-Shader-hf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for seanmemery/CodeLlama-34b-Instruct-Shader-hf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for seanmemery/CodeLlama-34b-Instruct-Shader-hf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for seanmemery/CodeLlama-34b-Instruct-Shader-hf to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="seanmemery/CodeLlama-34b-Instruct-Shader-hf", max_seq_length=2048, ) - Docker Model Runner
How to use seanmemery/CodeLlama-34b-Instruct-Shader-hf with Docker Model Runner:
docker model run hf.co/seanmemery/CodeLlama-34b-Instruct-Shader-hf
CodeLlama-34b-Instruct-Shader-hf
This model is a fine-tuned version of codellama/CodeLlama-34b-Instruct-hf on the generator dataset. It achieves the following results on the evaluation set:
- Loss: 0.7792
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0025
- train_batch_size: 4
- eval_batch_size: 1
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: polynomial
- num_epochs: 2
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.3476 | 0.25 | 1000 | 1.3561 |
| 1.3274 | 0.49 | 2000 | 1.1683 |
| 1.1964 | 0.74 | 3000 | 1.0129 |
| 0.8117 | 0.98 | 4000 | 0.9106 |
| 0.5179 | 1.23 | 5000 | 0.8560 |
| 0.7726 | 1.48 | 6000 | 0.8096 |
| 0.7396 | 1.72 | 7000 | 0.7855 |
| 0.6125 | 1.97 | 8000 | 0.7792 |
Framework versions
- Transformers 4.38.2
- Pytorch 2.2.1
- Datasets 2.18.0
- Tokenizers 0.15.2
- Downloads last month
- 5
Model tree for seanmemery/CodeLlama-34b-Instruct-Shader-hf
Base model
codellama/CodeLlama-34b-Instruct-hf