Downloads · 30 days
13
3% of all-time downloads
Emma92/llama-2-7b-emma-1k
llama-2-7b-emma-1k is a text generation model from Emma92. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as bigscience-openrail-m.
Downloads · 30 days
13
3% of all-time downloads
All-time downloads
414
Public
Parameters
6.7B
27 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin13.5 GB · 50%
How the weights are stored.
F166.7B · 100%
From the Hugging Face model README
💻 Colab
# Install required libraries
!pip install transformers accelerate
import torch
import transformers
from transformers import AutoTokenizer
# Model and prompt information
model_name = "Emma92/llama-2-7b-emma-1k"
prompt = "Who is Immanuel Kant?"
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Set up the text generation pipeline
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
# Generate text sequences
sequences = generator(
f'<s>[INST] {prompt} [/INST]', # Include prompt in the input
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
max_length=200,
)
# Print generated sequences
for seq in sequences:
print(f"Result: {seq['generated_text']}")
Result: <s>[INST] Who is Immanuel Kant? [/INST] Immanuel Kant was a German philosopher and one of the most influential thinkers in modern Western philosophy.Ъ He is best known for his work on ethics, metaphysics, epistemology and aesthetics, which has had a profound impact on the development of modern philosophy. He was born in Königsberg, Prussia in 1724 and died in the same city in 1804. Through his work, Kant established many of the foundational concepts of modern philosophy, and his ideas continue to influence philosophy and other fields to this day.
Some of Kant's most well-known ideas include:
1. Critique of Pure Reason: This is Kant's most famous work, in which he develops a comprehensive critique of reason and its limits. He argues that our understanding is shaped by the categories