Instructions to use actionpace/EvolCodeLlama-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use actionpace/EvolCodeLlama-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="actionpace/EvolCodeLlama-7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("actionpace/EvolCodeLlama-7b") model = AutoModelForCausalLM.from_pretrained("actionpace/EvolCodeLlama-7b") - llama-cpp-python
How to use actionpace/EvolCodeLlama-7b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="actionpace/EvolCodeLlama-7b", filename="EvolCodeLlama-7b_Q8_0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use actionpace/EvolCodeLlama-7b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf actionpace/EvolCodeLlama-7b:Q8_0 # Run inference directly in the terminal: llama cli -hf actionpace/EvolCodeLlama-7b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf actionpace/EvolCodeLlama-7b:Q8_0 # Run inference directly in the terminal: llama cli -hf actionpace/EvolCodeLlama-7b:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf actionpace/EvolCodeLlama-7b:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf actionpace/EvolCodeLlama-7b:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf actionpace/EvolCodeLlama-7b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf actionpace/EvolCodeLlama-7b:Q8_0
Use Docker
docker model run hf.co/actionpace/EvolCodeLlama-7b:Q8_0
- LM Studio
- Jan
- vLLM
How to use actionpace/EvolCodeLlama-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "actionpace/EvolCodeLlama-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "actionpace/EvolCodeLlama-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/actionpace/EvolCodeLlama-7b:Q8_0
- SGLang
How to use actionpace/EvolCodeLlama-7b 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 "actionpace/EvolCodeLlama-7b" \ --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": "actionpace/EvolCodeLlama-7b", "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 "actionpace/EvolCodeLlama-7b" \ --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": "actionpace/EvolCodeLlama-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use actionpace/EvolCodeLlama-7b with Ollama:
ollama run hf.co/actionpace/EvolCodeLlama-7b:Q8_0
- Unsloth Studio
How to use actionpace/EvolCodeLlama-7b 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 actionpace/EvolCodeLlama-7b 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 actionpace/EvolCodeLlama-7b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for actionpace/EvolCodeLlama-7b to start chatting
- Atomic Chat new
- Docker Model Runner
How to use actionpace/EvolCodeLlama-7b with Docker Model Runner:
docker model run hf.co/actionpace/EvolCodeLlama-7b:Q8_0
- Lemonade
How to use actionpace/EvolCodeLlama-7b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull actionpace/EvolCodeLlama-7b:Q8_0
Run and chat with the model
lemonade run user.EvolCodeLlama-7b-Q8_0
List all available models
lemonade list
Commit ·
c75fbb2
1
Parent(s): e5ea0a2
Training in progress, epoch 1
Browse files- adapter_config.json +28 -0
- adapter_model.bin +3 -0
- config.json +39 -0
- special_tokens_map.json +24 -0
- tokenizer.model +3 -0
- tokenizer_config.json +43 -0
- training_args.bin +3 -0
adapter_config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "codellama/CodeLlama-7b-hf",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"fan_in_fan_out": null,
|
| 7 |
+
"inference_mode": true,
|
| 8 |
+
"init_lora_weights": true,
|
| 9 |
+
"layers_pattern": null,
|
| 10 |
+
"layers_to_transform": null,
|
| 11 |
+
"lora_alpha": 16,
|
| 12 |
+
"lora_dropout": 0.05,
|
| 13 |
+
"modules_to_save": null,
|
| 14 |
+
"peft_type": "LORA",
|
| 15 |
+
"r": 32,
|
| 16 |
+
"rank_pattern": {},
|
| 17 |
+
"revision": null,
|
| 18 |
+
"target_modules": [
|
| 19 |
+
"up_proj",
|
| 20 |
+
"v_proj",
|
| 21 |
+
"o_proj",
|
| 22 |
+
"down_proj",
|
| 23 |
+
"gate_proj",
|
| 24 |
+
"q_proj",
|
| 25 |
+
"k_proj"
|
| 26 |
+
],
|
| 27 |
+
"task_type": "CAUSAL_LM"
|
| 28 |
+
}
|
adapter_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4a7093fd570d84977bbb3b8fad4808a806ebf74a41f6150aa34b05d247a37dd
|
| 3 |
+
size 319977229
|
config.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "codellama/CodeLlama-7b-hf",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 4096,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 11008,
|
| 13 |
+
"max_position_embeddings": 16384,
|
| 14 |
+
"model_type": "llama",
|
| 15 |
+
"num_attention_heads": 32,
|
| 16 |
+
"num_hidden_layers": 32,
|
| 17 |
+
"num_key_value_heads": 32,
|
| 18 |
+
"pretraining_tp": 1,
|
| 19 |
+
"quantization_config": {
|
| 20 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 21 |
+
"bnb_4bit_quant_type": "nf4",
|
| 22 |
+
"bnb_4bit_use_double_quant": true,
|
| 23 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 24 |
+
"llm_int8_has_fp16_weight": false,
|
| 25 |
+
"llm_int8_skip_modules": null,
|
| 26 |
+
"llm_int8_threshold": 6.0,
|
| 27 |
+
"load_in_4bit": true,
|
| 28 |
+
"load_in_8bit": false,
|
| 29 |
+
"quant_method": "bitsandbytes"
|
| 30 |
+
},
|
| 31 |
+
"rms_norm_eps": 1e-05,
|
| 32 |
+
"rope_scaling": null,
|
| 33 |
+
"rope_theta": 1000000,
|
| 34 |
+
"tie_word_embeddings": false,
|
| 35 |
+
"torch_dtype": "bfloat16",
|
| 36 |
+
"transformers_version": "4.34.1",
|
| 37 |
+
"use_cache": false,
|
| 38 |
+
"vocab_size": 32016
|
| 39 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "</s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": "</s>",
|
| 17 |
+
"unk_token": {
|
| 18 |
+
"content": "<unk>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
}
|
| 24 |
+
}
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45ccb9c8b6b561889acea59191d66986d314e7cbd6a78abc6e49b139ca91c1e6
|
| 3 |
+
size 500058
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"added_tokens_decoder": {
|
| 5 |
+
"0": {
|
| 6 |
+
"content": "<unk>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"1": {
|
| 14 |
+
"content": "<s>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"2": {
|
| 22 |
+
"content": "</s>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"bos_token": "<s>",
|
| 31 |
+
"clean_up_tokenization_spaces": false,
|
| 32 |
+
"eos_token": "</s>",
|
| 33 |
+
"legacy": true,
|
| 34 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 35 |
+
"pad_token": "</s>",
|
| 36 |
+
"sp_model_kwargs": {},
|
| 37 |
+
"spaces_between_special_tokens": false,
|
| 38 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 39 |
+
"trust_remote_code": false,
|
| 40 |
+
"unk_token": "<unk>",
|
| 41 |
+
"use_default_system_prompt": true,
|
| 42 |
+
"use_fast": true
|
| 43 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e119793adec89e061da62a7de24a1a71fb0682ce4c3e3f95d85eab584ad38284
|
| 3 |
+
size 4539
|