
# A Llama Chat Model of 160M Parameters

- Base model: [JackFram/llama-160m](https://huggingface.co/JackFram/llama-160m)
- Datasets:
  - [ehartford/wizard_vicuna_70k_unfiltered](https://huggingface.co/datasets/ehartford/wizard_vicuna_70k_unfiltered)
  - [totally-not-an-llm/EverythingLM-data-V3](https://huggingface.co/datasets/totally-not-an-llm/EverythingLM-data-V3)
  - [Open-Orca/SlimOrca-Dedup](https://huggingface.co/datasets/Open-Orca/SlimOrca-Dedup)
  - [databricks/databricks-dolly-15k](https://huggingface.co/datasets/databricks/databricks-dolly-15k)
  - [THUDM/webglm-qa](https://huggingface.co/datasets/THUDM/webglm-qa)
- Availability in other ML formats:
  - GGUF: [Felladrin/gguf-Llama-160M-Chat-v1](https://huggingface.co/Felladrin/gguf-Llama-160M-Chat-v1)
  - ONNX: [Felladrin/onnx-Llama-160M-Chat-v1](https://huggingface.co/Felladrin/onnx-Llama-160M-Chat-v1)
  - MLC: [Felladrin/mlc-q4f16-Llama-160M-Chat-v1](https://huggingface.co/Felladrin/mlc-q4f16-Llama-160M-Chat-v1)
  - MLX: [mlx-community/Llama-160M-Chat-v1-4bit-mlx](https://huggingface.co/mlx-community/Llama-160M-Chat-v1-4bit-mlx)

## Recommended Prompt Format

```
<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{user_message}<|im_end|>
<|im_start|>assistant
```

## Recommended Inference Parameters

```yml
penalty_alpha: 0.5
top_k: 4
repetition_penalty: 1.01
```

## Usage Example

```python
from transformers import pipeline

generate = pipeline("text-generation", "Felladrin/Llama-160M-Chat-v1")

messages = [
    {
        "role": "system",
        "content": "You are a helpful assistant who answers user's questions with details and curiosity.",
    },
    {
        "role": "user",
        "content": "What are some potential applications for quantum computing?",
    },
]

prompt = generate.tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)

output = generate(
    prompt,
    max_new_tokens=1024,
    penalty_alpha=0.5,
    top_k=4,
    repetition_penalty=1.01,
)

print(output[0]["generated_text"])
```

{"language": ["en"], "license": "apache-2.0", "tags": ["text-generation"], "datasets": ["ehartford/wizard_vicuna_70k_unfiltered", "totally-not-an-llm/EverythingLM-data-V3", "Open-Orca/SlimOrca-Dedup", "databricks/databricks-dolly-15k", "THUDM/webglm-qa"], "base_model": "JackFram/llama-160m", "widget": [{"text": "<|im_start|>system\nYou are a helpful assistant, who answers with empathy.<|im_end|>\n<|im_start|>user\nGot a question for you!<|im_end|>\n<|im_start|>assistant\nSure! What's it?<|im_end|>\n<|im_start|>user\nWhy do you love cats so much!? \ud83d\udc08<|im_end|>\n<|im_start|>assistant"}, {"text": "<|im_start|>system\nYou are a helpful assistant who answers user's questions with empathy.<|im_end|>\n<|im_start|>user\nWho is Mona Lisa?<|im_end|>\n<|im_start|>assistant"}, {"text": "<|im_start|>system\nYou are a helpful assistant who provides concise responses.<|im_end|>\n<|im_start|>user\nHeya!<|im_end|>\n<|im_start|>assistant\nHi! How may I help you today?<|im_end|>\n<|im_start|>user\nI need to build a simple website. Where should I start learning about web development?<|im_end|>\n<|im_start|>assistant"}, {"text": "<|im_start|>user\nInvited some friends to come home today. Give me some ideas for games to play with them!<|im_end|>\n<|im_start|>assistant"}, {"text": "<|im_start|>system\nYou are a helpful assistant who answers user's questions with details and curiosity.<|im_end|>\n<|im_start|>user\nWhat are some potential applications for quantum computing?<|im_end|>\n<|im_start|>assistant"}, {"text": "<|im_start|>system\nYou are a helpful assistant who gives creative responses.<|im_end|>\n<|im_start|>user\nWrite the specs of a game about mages in a fantasy world.<|im_end|>\n<|im_start|>assistant"}, {"text": "<|im_start|>system\nYou are a helpful assistant who answers user's questions with details.<|im_end|>\n<|im_start|>user\nTell me about the pros and cons of social media.<|im_end|>\n<|im_start|>assistant"}, {"text": "<|im_start|>system\nYou are a helpful assistant who answers user's questions with confidence.<|im_end|>\n<|im_start|>user\nWhat is a dog?<|im_end|>\n<|im_start|>assistant\nA dog is a four-legged, domesticated animal that is a member of the class Mammalia, which includes all mammals. Dogs are known for their loyalty, playfulness, and ability to be trained for various tasks. They are also used for hunting, herding, and as service animals.<|im_end|>\n<|im_start|>user\nWhat is the color of an apple?<|im_end|>\n<|im_start|>assistant"}], "inference": {"parameters": {"max_new_tokens": 250, "penalty_alpha": 0.5, "top_k": 4, "repetition_penalty": 1.01}}}
transformers safetensors llama text-generation conversational en dataset:ehartford/wizard_vicuna_70k_unfiltered dataset:totally-not-an-llm/EverythingLM-data-V3 dataset:Open-Orca/SlimOrca-Dedup dataset:databricks/databricks-dolly-15k dataset:THUDM/webglm-qa base_model:JackFram/llama-160m license:apache-2.0 autotrain_compatible endpoints_compatible has_space text-generation-inference region:us