alt.freeweights.granite / granite-34b-code-base-8k
From: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject:

granite-34b-code-base-8k

Date: 2026-11-15Commit: 291a64fSigned: 2DC28CC7B26A283B ✓

Text generation model with 33.7B parameters. Safetensors weights, 67.4 GB in all. Published by ibm-granite under Apache-2.0.

33.7B params67.4GBgranite-34b-code-base-8ksafetensorspermissive
FactsParams33.7BSize67.4 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get ibm-granite/granite-34b-code-base-8k
# manifest sha256 80d45f9c9db4… · 67.4 GB · 22 files
$ fw verify ./granite-34b-code-base-8k ibm-granite/granite-34b-code-base-8k
From sourceHosted (signed)ibm-granite/granite-34b-code-base-8kLast check: 2026-11-15 03:45 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Overview

Size
67.4 GB
Weights
67.4 GB (safetensors)
Parameters
33.7B
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
22, each with a sha256
Publisher
ibm-granite
Added
2026-11-15
Section
alt.freeweights.granite
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:45 UTCpassed

Model card

From the publisher at commit 291a64f. Shown as plain text with links; images open at the publisher.

⚠️ DEPRECATION WARNING ⚠️#

New applications/projects should use the latest mainline Granite language model family, whose code capabilities supercede this model. This model is being made available strictly for historical/scientific purposes. Please see our Granite Collections for the latest Granite releases.


Image: image/png

Granite-34B-Code-Base-8K#

Model Summary#

Granite-34B-Code-Base-8K is a decoder-only code model designed for code generative tasks (e.g., code generation, code explanation, code fixing, etc.). It is trained using depth upscaling from Granite-20B-Code-Base model with a two-phase training strategy. In phase 1, our model is trained on 3 trillion tokens (1.4 trillion tokens after depth up scaling). In phase 2, our model is trained on 500 billion tokens with a carefully designed mixture of high-quality data from code and natural language domains to improve the models’ ability to reason and follow instructions.

Usage#

Intended use#

Prominent enterprise use cases of LLMs in software engineering productivity include code generation, code explanation, code fixing, generating unit tests, generating documentation, addressing technical debt issues, vulnerability detection, code translation, and more. All Granite Code Base models, including the 34B parameter model, are able to handle these tasks as they were trained on a large amount of code data from 116 programming languages.

Generation#

This is a simple example of how to use Granite-34B-Code-Base-8K model.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # or "cpu"
model_path = "ibm-granite/granite-34b-code-base-8k"
tokenizer = AutoTokenizer.from_pretrained(model_path)
# drop device_map if running on CPU
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
model.eval()
# change input text as desired
input_text = "def generate():"
# tokenize the text
input_tokens = tokenizer(input_text, return_tensors="pt")
# transfer tokenized inputs to the device
for i in input_tokens:
    input_tokens[i] = input_tokens[i].to(device)
# generate output tokens
output = model.generate(**input_tokens)
# decode output tokens into text
output = tokenizer.batch_decode(output)
# loop over the batch to print, in this example the batch size is 1
for i in output:
    print(i)

Training Data#

  • Data Collection and Filtering: Pretraining code data is sourced from a combination of publicly available datasets (e.g., GitHub Code Clean, Starcoder data), and additional public code repositories and issues from GitHub. We filter raw data to retain a list of 116 programming languages. After language filtering, we also filter out low-quality code.
  • Exact and Fuzzy Deduplication: We adopt an aggressive deduplication strategy that includes both exact and fuzzy deduplication to remove documents having (near) identical code content.
  • HAP, PII, Malware Filtering: We apply a HAP content filter that reduces models' likelihood of generating hateful, abusive, or profane language. We also make sure to redact Personally Identifiable Information (PII) by replacing PII content (e.g., names, email addresses, keys, passwords) with corresponding tokens (e.g., ⟨NAME⟩, ⟨EMAIL⟩, ⟨KEY⟩, ⟨PASSWORD⟩). Moreover, we scan all datasets using ClamAV to identify and remove instances of malware in the source code.
  • Natural Language Datasets: In addition to collecting code data for model training, we curate several publicly available high-quality natural language datasets to improve models' proficiency in language understanding and mathematical reasoning. Unlike the code data, we do not deduplicate these datasets.

Infrastructure#

We train the Granite Code models using two of IBM's super computing clusters, namely Vela and Blue Vela, both outfitted with NVIDIA A100 and H100 GPUs respectively. These clusters provide a scalable and efficient infrastructure for training our models over thousands of GPUs.

Ethical Considerations and Limitations#

The use of Large Language Models involves risks and ethical considerations people must be aware of. Regarding code generation, caution is urged against complete reliance on specific code models for crucial decisions or impactful information as the generated code is not guaranteed to work as intended. Granite-34B-Code-Base-8K model is not the exception in this regard. Even though this model is suited for multiple code-related tasks, it has not undergone any safety alignment, there it may produce problematic outputs. Additionally, it remains uncertain whether smaller models might exhibit increased susceptibility to hallucination in generation scenarios by copying source code verbatim from the training dataset due to their reduced sizes and memorization capacities. This aspect is currently an active area of research, and we anticipate more rigorous exploration, comprehension, and mitigations in this domain. Regarding ethics, a latent risk associated with all Large Language Models is their malicious utilization. We urge the community to use Granite-34B-Code-Base-8K model with ethical intentions and in a responsible way.

Files

22 files · 67.4 GBWeights 67.4 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 22 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md10.8 KB7f28626f559abace09e71036f32591d565a9cff4585ded8a056ba51191d816dc
config.json657 B7b61e3d1e5eadb714c3a590695be5817293d311931805a1feb99adc165f14350
generation_config.json132 B673021e17fb8aed9baa20191415ba21cea4e37ad60a2ec319833fac4f3cfc997
model-00001-of-00014.safetensors4.95 GB7bdd83087569bb422aa4d972785416e8b443ef65aced0eb13d291722cf108967
model-00002-of-00014.safetensors4.93 GB7ebb2c9f0fd3d02715c1ae0be5715ca7489261740d8628d5b8ed08dbcd941caf
model-00003-of-00014.safetensors4.93 GB9cf7c91e203b901daa9000f585cce4f2c393615f95add2ad16a8936168b108b2
model-00004-of-00014.safetensors4.93 GB6c87009865a12ad60701d67e94799ccf8d9e50661a1813f36cbe98d99c780bbd
model-00005-of-00014.safetensors4.93 GB5a3003750e618b2fcba9ffa4d44438b931762d2baf4efc0466142be5077bce33
model-00006-of-00014.safetensors4.93 GB6af9f62f0e4021afcd566c4365393f0c2171da1e56fefec1d2938e986beecb2b
model-00007-of-00014.safetensors4.93 GBe78910f46278ea8874a0328abfc1035889e786452e7c483045189a162c2260ec
model-00008-of-00014.safetensors4.93 GBe18817f2c9fe4e738744b4830bbb187824b7118d15f7002dd24edcc1b7357b99
model-00009-of-00014.safetensors4.93 GB2562503328f845ac637e5d3e2022a6006d5e5a64fec07ff5c9bbef42e224a274
model-00010-of-00014.safetensors4.93 GB0454b923b12be88d35bf76229e4a0d47163f115fe5c81562210804be9604f69c
model-00011-of-00014.safetensors4.93 GB638701e056e64e29ca55d740a4aab826ab2d0c161cce7435d1c8a7cd81ff9fd8
model-00012-of-00014.safetensors4.93 GBa2887421c4ecd20545167e3fe98bd08adfdec5cf99d37e71293e2dd55f5346b0
model-00013-of-00014.safetensors4.93 GB15c346c324d56cfa5822c7a82dec0fb96b786ea82ecf0afaa8f96166deec444a
model-00014-of-00014.safetensors3.34 GBf7a0a192f7f4755567ad2ad99c21a8fdaa1e30c39c02675f31d262085acbd7cd
model.safetensors.index.json79.4 KB40e515b563c2514a67250ee2eab94bf4720070e3dbcc9430f0283d836a375fa0
special_tokens_map.json906 Bf22e01b022165e8efea3421d9f0aba6b8a13fab084ac291b587286cd2e373d05
tokenizer.json2.06 MB9af07a3123a1f4d75dcb85fbdc4c62f9b7873d23fa39c449d2240c3e33eb3ab5
tokenizer_config.json4.11 KB48aab024a0227ab30fcc5d14ae96cbf7c61eb923b3d06bddb183d026da879223
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
291a64f103 pinned now2026-11-15 03:45 UTC22 files · 67.4 GB

Use it

$ fw get ibm-granite/granite-34b-code-base-8k
# manifest sha256 80d45f9c9db4… · 67.4 GB · 22 files
$ fw verify ./granite-34b-code-base-8k ibm-granite/granite-34b-code-base-8k
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/ibm-granite/granite-34b-code-base-8k.json --dir ./granite-34b-code-base-8k $ python3 fw.py verify ./granite-34b-code-base-8k ./ibm-granite__granite-34b-code-base-8k.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-34b-code-base-8k --revision 291a64f1033cfb63f0d4dc6bf0352522a2ab7539 --local-dir ./granite-34b-code-base-8k
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("ibm-granite/granite-34b-code-base-8k", revision="291a64f1033cfb63f0d4dc6bf0352522a2ab7539") model = AutoModelForCausalLM.from_pretrained("ibm-granite/granite-34b-code-base-8k", revision="291a64f1033cfb63f0d4dc6bf0352522a2ab7539", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve ibm-granite/granite-34b-code-base-8k --revision 291a64f1033cfb63f0d4dc6bf0352522a2ab7539

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
7f28626f559abace09e71036f32591d565a9cff4585ded8a056ba51191d816dc
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject: granite-34b-code-base-8kDate: 2026-11-15Commit: 291a64fSigned: 2DC28CC7B26A283B ✓
Upstream
ibm-granite/granite-34b-code-base-8k
Pinned commit
291a64f1033cfb63f0d4dc6bf0352522a2ab7539
Manifest
granite-34b-code-base-8k.json · .minisig
Manifest sha256
80d45f9c9db4525c19c23cdf81e801a335b965ab9a451a16e35fcf65593fb123
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:45 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-34b-code-base-8k.json $ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-34b-code-base-8k.json.minisig $ minisign -Vm granite-34b-code-base-8k.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

2 models in the catalog name this one as their parent.

Fine-tunes
1
Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-34b-code-base-8k
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. granite-34b-code-base-8k.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of granite-34b-code-base-8k. Each has its own license check and page.

From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed1
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed2
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed3
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed1
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed2
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed3