Downloads · 30 days
28
4% of all-time downloads
Heatw4ve/gemma-2-text-rewriter-gguf
gemma-2-text-rewriter-gguf is a text generation model from Heatw4ve. Use it when you need the model to write or continue text. It is set up for gguf. The card lists the license as gemma.
This model is a fine-tuned version of Google's Gemma-2-9b, specialized in rewriting AI-toned or robotic text into natural, human-like writing. It was trained using Unsloth for 4-bit quantization and high-efficiency pe…
Downloads · 30 days
28
4% of all-time downloads
All-time downloads
708
Public
Repo size
5.8 GB
Likes
2
Public
Click a slice to open those files.
.gguf5.8 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of Google's Gemma-2-9b, specialized in rewriting AI-toned or robotic text into natural, human-like writing. It was trained using Unsloth for 4-bit quantization and high-efficiency performance.
🔗Kaggle notebook here
unsloth/gemma-2-9b-bnb-4bit)The model was fine-tuned with the following parameters:
To achieve the intended rewriting style, use the following system prompt:
You are a helpful assistant that rewrites AI-toned text into natural, human-like writing.
Rewrite the following text to sound like a real human wrote it:
[INSERT TEXT HERE]
llm = Llama(
model_path="/path/to/your/model",
n_ctx=8192,
n_gpu_layers=16,
n_threads=4,
verbose=verbose,
chat_format="gemma",
)
text='''
William Shakespeare, the master of human insight, gifted us with a timeless observation that cuts to the heart of intellect and humility: "The fool doth think he is wise, but the wise man knows himself to be a fool." Uttered by the character Touchstone in As You Like It, this seemingly paradoxical statement is far more than a witty quip; it's a profound commentary on self-awareness, the nature of true wisdom, and the perpetual quest for knowledge.
'''
messages = [
{"role": "system", "content": "You are a helpful assistant that rewrites AI-toned text into natural, human-like writing."},
{"role": "user", "content": f"Rewrite the following text to sound like a real human wrote it:\n\n{text}"}
]
output = llm.create_chat_completion(
messages=messages,
max_tokens=512,
temperature=random.uniform(0.9, 1.9),
top_p=random.uniform(0.87, 0.96),
seed=random.randint(2, 2**32),
stop=["<end_of_turn>", "<eos>", "</s>"]
)
print(output["choices"][0]["message"]["content"].strip())
🔗Connect with me on LinkedIn