crumbs-playground / 27b-3bit-testing

huggingface.co
Total runs: 16
24-hour runs: 0
7-day runs: -2
30-day runs: 2
Model's Last Updated: July 29 2026

Introduction of 27b-3bit-testing

Model Details of 27b-3bit-testing

from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "crumbs-playground/27b-3bit-testing"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model     = AutoModelForCausalLM.from_pretrained(
    model_id, dtype=torch.bfloat16, 
    device_map="cuda",
    trust_remote_code=True,
)

model.add_adapter("my_lora_adapter", r=32, alpha=32**0.5, trainable=True)
model.generation_config.cache_implementation = "static"
torch.compile(model._c23_base_model, mode="reduce-overhead", fullgraph=False)

with model.disable_adapters(["my_lora_adapter"]): # <- disable loras if you want!
    inputs = tokenizer("Once upon a time,", return_tensors="pt")
    inputs = {k:v.to("cuda:0") for k,v in inputs.items()}
    outputs = model.generate(
        **inputs, do_sample=True,
        max_new_tokens=32,
        temperature=1.0,
        top_k=0,
    )
    print(tokenizer.decode(outputs[0]))


# reinforcement learning!
advantage = 10.0 # <- what it generated was awesome

optimizer = torch.optim.AdamW(
    [p for n,p in model.named_parameters() if "my_lora_adapter" in n],
    3e-5, weight_decay=0.1, betas=(0.9, 0.95)
)
logits = model(outputs.clone().detach()).logits
logits = logits[:, inputs['input_ids'].shape[-1]:, :]
labels = outputs[:, inputs['input_ids'].shape[-1]:].clone()
loss = torch.nn.functional.cross_entropy(
    logits.reshape(-1, logits.size(-1)),
    labels.reshape(-1),
    reduction="none",
).view(labels.shape)
policy_loss = (-loss * -advantage).mean()
policy_loss.backward()

grad_norm = torch.nn.utils.clip_grad_norm_(model.parameters(), 0.5)
optimizer.step()

# save your adapters to the huggingface hub!
model.push_to_hub("storybook", "me/CHQQ-adapter-proof-of-concept")

# load other people's uploaded adapters from the hub!
model.load_adapter(
    adapter_name="custom_adapter", 
    load_directory="someone_else/CHQQ-proof-of-concept"
)

Runs of crumbs-playground 27b-3bit-testing on huggingface.co

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

More Information About 27b-3bit-testing huggingface.co Model

27b-3bit-testing huggingface.co

27b-3bit-testing huggingface.co is an AI model on huggingface.co that provides 27b-3bit-testing's model effect (), which can be used instantly with this crumbs-playground 27b-3bit-testing model. huggingface.co supports a free trial of the 27b-3bit-testing model, and also provides paid use of the 27b-3bit-testing. Support call 27b-3bit-testing model through api, including Node.js, Python, http.

crumbs-playground 27b-3bit-testing online free

27b-3bit-testing huggingface.co is an online trial and call api platform, which integrates 27b-3bit-testing's modeling effects, including api services, and provides a free online trial of 27b-3bit-testing, you can try 27b-3bit-testing online for free by clicking the link below.

crumbs-playground 27b-3bit-testing online free url in huggingface.co:

https://huggingface.co/crumbs-playground/27b-3bit-testing

27b-3bit-testing install

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

27b-3bit-testing install url in huggingface.co:

https://huggingface.co/crumbs-playground/27b-3bit-testing

Url of 27b-3bit-testing

Provider of 27b-3bit-testing huggingface.co

crumbs-playground
ORGANIZATIONS

Other API from crumbs-playground