jinaai / falcon-7b-code-alpaca-lora

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: July 20 2023
text-generation

Introduction of falcon-7b-code-alpaca-lora

Model Details of falcon-7b-code-alpaca-lora



Finetuner logo: Finetuner helps you to create experiments in order to improve embeddings on search tasks. It accompanies you to deliver the last mile of performance-tuning for neural search applications.

LLM Generation models trained by Jina AI, Finetuner team.

This repo contains the lora weights (8bit) for Falcon-7b fit on the Code Alpaca dataset.

Reproduction

This version of the weights was trained with the following hyperparameters:

  • Epochs: 6
  • Batch size: 128
  • Micro batch size: 8
  • Learning rate: 3e-4
  • Lora r : 8
  • Lora target modules: query_key_value

You can reproduce using this repository:

https://github.com/jina-ai/jerboa

Make sure you install requirements and finetune using this command using the following command:

python finetune.py \
--base-model tiiuae/falcon-7b --lora-target-modules query_key_value \
--data-path sahil2801/CodeAlpaca-20k --output-dir ./lora-alpaca-code \
--batch-size 128 --micro-batch-size 8 --eval-limit 45 \
--eval-file code_eval.jsonl --wandb-project jerboa --wandb-log-model \
 --wandb-watch gradients --num-epochs 6
Inference
import torch
from peft import PeftModel
from transformers import AutoTokenizer, AutoModelForCausalLM


TOKENIZER_SOURCE = 'tiiuae/falcon-7b'
BASE_MODEL = 'tiiuae/falcon-7b'
LORA_REPO = 'jinaai/falcon-7b-code-alpaca-lora'
DEVICE = "cuda"

PROMPT = """
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Write a for loop in python

### Input:

### Response:
"""
model = AutoModelForCausalLM.from_pretrained(
    pretrained_model_name_or_path=BASE_MODEL,
    torch_dtype=torch.float16,
    trust_remote_code=True,
    device_map='auto',
)

model = PeftModel.from_pretrained(
    model=model,
    model_id=LORA_REPO,
)
model.eval()

tokenizer = AutoTokenizer.from_pretrained(
    TOKENIZER_SOURCE,
    trust_remote_code=True,
    padding_side='left',
)
tokenizer.pad_token = tokenizer.eos_token

inputs = tokenizer(PROMPT, return_tensors="pt")
input_ids = inputs["input_ids"].to(DEVICE)
input_attention_mask = inputs["attention_mask"].to(DEVICE)

with torch.no_grad():
    generation_output = model.generate(
        input_ids=input_ids,
        attention_mask=input_attention_mask,
        return_dict_in_generate=True,
        max_new_tokens=32,
        eos_token_id=tokenizer.eos_token_id,
    )
generation_output = generation_output.sequences[0]
output = tokenizer.decode(generation_output, skip_special_tokens=True)

print(output)
Contact

Join our Discord community and chat with other community members about ideas.

Runs of jinaai falcon-7b-code-alpaca-lora on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About falcon-7b-code-alpaca-lora huggingface.co Model

More falcon-7b-code-alpaca-lora license Visit here:

https://choosealicense.com/licenses/cc-by-nc-4.0

falcon-7b-code-alpaca-lora huggingface.co

falcon-7b-code-alpaca-lora huggingface.co is an AI model on huggingface.co that provides falcon-7b-code-alpaca-lora's model effect (), which can be used instantly with this jinaai falcon-7b-code-alpaca-lora model. huggingface.co supports a free trial of the falcon-7b-code-alpaca-lora model, and also provides paid use of the falcon-7b-code-alpaca-lora. Support call falcon-7b-code-alpaca-lora model through api, including Node.js, Python, http.

falcon-7b-code-alpaca-lora huggingface.co Url

https://huggingface.co/jinaai/falcon-7b-code-alpaca-lora

jinaai falcon-7b-code-alpaca-lora online free

falcon-7b-code-alpaca-lora huggingface.co is an online trial and call api platform, which integrates falcon-7b-code-alpaca-lora's modeling effects, including api services, and provides a free online trial of falcon-7b-code-alpaca-lora, you can try falcon-7b-code-alpaca-lora online for free by clicking the link below.

jinaai falcon-7b-code-alpaca-lora online free url in huggingface.co:

https://huggingface.co/jinaai/falcon-7b-code-alpaca-lora

falcon-7b-code-alpaca-lora install

falcon-7b-code-alpaca-lora is an open source model from GitHub that offers a free installation service, and any user can find falcon-7b-code-alpaca-lora on GitHub to install. At the same time, huggingface.co provides the effect of falcon-7b-code-alpaca-lora install, users can directly use falcon-7b-code-alpaca-lora installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

falcon-7b-code-alpaca-lora install url in huggingface.co:

https://huggingface.co/jinaai/falcon-7b-code-alpaca-lora

Url of falcon-7b-code-alpaca-lora

falcon-7b-code-alpaca-lora huggingface.co Url

Provider of falcon-7b-code-alpaca-lora huggingface.co

jinaai
ORGANIZATIONS

Other API from jinaai

huggingface.co

Total runs: 105.4K
Run Growth: 1.2K
Growth Rate: 1.17%
Updated:April 08 2026
huggingface.co

Total runs: 80.9K
Run Growth: -29.0K
Growth Rate: -35.91%
Updated:April 08 2026
huggingface.co

Total runs: 72.8K
Run Growth: -151.6K
Growth Rate: -208.22%
Updated:August 20 2026
huggingface.co

Total runs: 3.1K
Run Growth: 1.7K
Growth Rate: 54.06%
Updated:September 18 2026
huggingface.co

Total runs: 1.5K
Run Growth: 378
Growth Rate: 25.82%
Updated:March 04 2025
huggingface.co

Total runs: 1.3K
Run Growth: 785
Growth Rate: 61.81%
Updated:April 03 2026
huggingface.co

Total runs: 271
Run Growth: 16
Growth Rate: 5.90%
Updated:December 17 2025