falcon code generation llm

ProviderKatochh
Categorycode-generation
Licenseapache-2.0
Downloads3
Stars0

Overview

Falcon Code is a specialized LLM optimized for software engineering tasks, designed to bridge the gap between general-purpose language models and dedicated code assistants. For developers, this means stronger performance in syntax accuracy, boilerplate generation, and complex logic implementation across multiple programming languages. Unlike general models, it is tuned to minimize hallucinations in API calls and maintain strict adherence to structural patterns. It integrates easily into existing CI/CD pipelines or IDE plugins via standard API endpoints, offering a performant alternative for teams requiring an Apache-2.0 licensed model to avoid vendor lock-in while maintaining high-quality code completion and refactoring capabilities.

Highlights

  • Apache-2.0 license for flexible commercial deployment
  • Optimized for multi-language syntax and logic accuracy
  • Efficient integration into IDEs and development workflows
  • Reduced hallucinations in technical API implementations

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("Katochh/falcon-code-generation-llm")
tokenizer = AutoTokenizer.from_pretrained("Katochh/falcon-code-generation-llm")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download Katochh/falcon-code-generation-llm

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download Katochh/falcon-code-generation-llm config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('Katochh/falcon-code-generation-llm')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/Katochh/falcon-code-generation-llm

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Katochh/falcon-code-generation-llm

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('Katochh/falcon-code-generation-llm')
tokenizer = AutoTokenizer.from_pretrained('Katochh/falcon-code-generation-llm')

Full Documentation

来源: HuggingFace

---
license: apache-2.0
library_name: peft
tags:

  • trl

  • sft

  • generated_from_trainer

base_model: petals-team/falcon-rw-1b
model-index:
  • name: falcon-code-generation-llm

results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

falcon-code-generation-llm

This model is a fine-tuned version of petals-team/falcon-rw-1b on an unknown dataset.
It achieves the following results on the evaluation set:

  • Loss: 1.8328

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.0002

  • train_batch_size: 2

  • eval_batch_size: 8

  • seed: 42

  • gradient_accumulation_steps: 2

  • total_train_batch_size: 4

  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08

  • lr_scheduler_type: cosine

  • lr_scheduler_warmup_ratio: 0.03

  • training_steps: 320

Training results

| Training Loss | Epoch | Step | Validation Loss |
|:-------------:|:-----:|:----:|:---------------:|
| 2.1898 | 0.1 | 20 | 1.9930 |
| 2.0474 | 0.2 | 40 | 1.9372 |
| 1.8768 | 0.3 | 60 | 1.9180 |
| 2.0356 | 0.4 | 80 | 1.8915 |
| 1.946 | 0.5 | 100 | 1.9185 |
| 1.9219 | 0.6 | 120 | 1.8740 |
| 1.973 | 0.7 | 140 | 1.8762 |
| 1.8046 | 0.8 | 160 | 1.8549 |
| 1.8934 | 0.9 | 180 | 1.8451 |
| 1.8365 | 1.0 | 200 | 1.8525 |
| 1.7949 | 1.1 | 220 | 1.8343 |
| 1.703 | 1.2 | 240 | 1.8443 |
| 1.6269 | 1.3 | 260 | 1.8453 |
| 1.6731 | 1.4 | 280 | 1.8330 |
| 1.6004 | 1.5 | 300 | 1.8331 |
| 1.7031 | 1.6 | 320 | 1.8328 |

Framework versions

  • PEFT 0.10.0
  • Transformers 4.40.0
  • Pytorch 2.2.1+cu121
  • Datasets 2.19.0
  • Tokenizers 0.19.1
Join our Telegram