emre/llama-2-13b-code-chat
is a Llama 2 version of
CodeAlpaca
.
🔧 Training
This model is based on the
llama-2-13b-chat-hf
model, fine-tuned using QLoRA on the
mlabonne/CodeLlama-2-20k
dataset.
It was trained on an Colab Pro+It was trained Colab Pro+.
It is mainly designed for educational purposes, not for inference but can be used exclusively with BBVA Group, GarantiBBVA and its subsidiaries.
💻 Usage
# pip install transformers acceleratefrom transformers import AutoTokenizer
import transformers
import torch
model = "emre/llama-2-13b-code-chat"
prompt = "Write Python code to generate an array with all the numbers from 1 to 100"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
sequences = pipeline(
f'<s>[INST] {prompt} [/INST]',
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
max_length=200,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")
Ouput:
Here is a Python code to generate an array with all the numbers from 1 to 100:
```
numbers = []
for i in range(1,101):
numbers.append(i)
```
This code generates an array with all the numbers from 1 to 100 in Python. It uses a loop that iterates over the range of numbers from 1 to 100, and for each number, it appends that number to the array 'numbers'. The variable 'numbers' is initialized to a list, and its length is set to 101 by using the range of numbers (0-99).
Runs of emre llama-2-13b-code-chat on huggingface.co
21
Total runs
0
24-hour runs
0
3-day runs
1
7-day runs
19
30-day runs
More Information About llama-2-13b-code-chat huggingface.co Model
llama-2-13b-code-chat huggingface.co is an AI model on huggingface.co that provides llama-2-13b-code-chat's model effect (), which can be used instantly with this emre llama-2-13b-code-chat model. huggingface.co supports a free trial of the llama-2-13b-code-chat model, and also provides paid use of the llama-2-13b-code-chat. Support call llama-2-13b-code-chat model through api, including Node.js, Python, http.
llama-2-13b-code-chat huggingface.co is an online trial and call api platform, which integrates llama-2-13b-code-chat's modeling effects, including api services, and provides a free online trial of llama-2-13b-code-chat, you can try llama-2-13b-code-chat online for free by clicking the link below.
emre llama-2-13b-code-chat online free url in huggingface.co:
llama-2-13b-code-chat is an open source model from GitHub that offers a free installation service, and any user can find llama-2-13b-code-chat on GitHub to install. At the same time, huggingface.co provides the effect of llama-2-13b-code-chat install, users can directly use llama-2-13b-code-chat installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
llama-2-13b-code-chat install url in huggingface.co: