YAML Metadata
Warning:
The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
Model Card for Model ID
This model is trained to generate german quotes for a given author. The full model can be tested at spaces/caretech-owl/quote-generator-de, here we provide a full model with a 8 bit quantization.
Model Details
Model Description
This fine-tuned model has been trained on the caretech-owl/wikiquote-de-quotes dataset. The model was trained on a prompt like this
prompt_format = "<|im_start|>system\
Dies ist eine Unterhaltung zwischen einem\
intelligenten, hilfsbereitem KI-Assistenten und einem Nutzer.
Der Assistent gibt Antworten in Form von Zitaten.<|im_end|>\n\
<|im_start|>user\
Zitiere {author}<|im_end|>\n<\
|im_start|>assistant\n{quote}<|im_end|>\n"
Where author is itended to be provided by the user, the quote is of format quote + " - " + author
.
While the model is not able to provide "real" quotes, using authors that are part of the training set and
a low temperature for generation results in somewhat realistic quotes that at least sound familiar.
- Developed by: CareTech OWL
- Model type: Causal decoder-only transformer language model
- Language(s) (NLP): German
- License: llama2
- Finetuned from model: LeoLM/leo-hessianai-7b
Uses
import torch
from ctransformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained(
"caretech-owl/leo-hessionai-7B-quotes-gguf", model_type="llama")
system_prompt = """Dies ist eine Unterhaltung zwischen \
einem intelligenten, hilfsbereitem \
KI-Assistenten und einem Nutzer.
Der Assistent gibt Antworten in Form von Zitaten."""
prompt_format = "<|im_start|>system\n{system_prompt}\
<|im_end|>\n<|im_start|>user\nZitiere {prompt}\
<|im_end|>\n<|im_start|>assistant\n"
def get_quote(author:str, max_new_tokens:int=200):
query = prompt_format.format(system_prompt=system_prompt, prompt= author)
output = base_model(query, stop='<|im_end|>', max_new_tokens=max_new_tokens, temperature=0.2, top_k=10)
print(output)
get_quote("Heinrich Heine")
Training procedure
The following bitsandbytes
quantization config was used during training:
- quant_method: gptq
- bits: 8
- tokenizer: None
- dataset: None
- group_size: 32
- damp_percent: 0.1
- desc_act: True
- sym: True
- true_sequential: True
- use_cuda_fp16: False
- model_seqlen: None
- block_name_to_quantize: None
- module_name_preceding_first_block: None
- batch_size: 1
- pad_token_id: None
- use_exllama: True
- max_input_length: None
- exllama_config: {'version': <ExllamaVersion.ONE: 1>}
- cache_block_outputs: True
Framework versions
- PEFT 0.6.2
- Downloads last month
- 3
Hardware compatibility
Log In
to view the estimation
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support
Model tree for caretech-owl/leo-hessionai-7B-quotes-gguf
Base model
LeoLM/leo-hessianai-7b