metadata
pipeline_tag: text-generation
library_name: transformers
license: apache-2.0
tags:
- interpretable
- text-classification
- text-generation
Concept Bottleneck Large Language Models
This repository contains the Concept Bottleneck Large Language Model (CB-LLM) presented in Concept Bottleneck Large Language Models.
Code: https://github.com/Trustworthy-ML-Lab/CB-LLMs
This model offers inherent interpretability and controllability in text generation. See the linked paper and GitHub repository for details on training and usage.
Usage (Example - Text Generation)
from transformers import pipeline, AutoTokenizer
model_name = "cesun/cbllm-generation" #replace with actual model name
pipe = pipeline(
"text-generation",
model_name,
tokenizer=AutoTokenizer.from_pretrained(model_name, trust_remote_code=True),
device_map="auto",
trust_remote_code=True,
)
print(pipe("The key to life is", max_new_tokens=20, do_sample=True)[0]["generated_text"])