Mia-1B / README.md
SharryOG's picture
Update README.md
b1ae2e2 verified
metadata
language:
  - en
  - hi
license: apache-2.0
library_name: transformers
tags:
  - mlx
datasets:
  - OEvortex/vortex-mini
base_model: OEvortex/HelpingAI-Lite
pipeline_tag: text-generation

Model Card

Model Name: Mia-1B

Model Type: Text Generation

Owner: MysteriousAI

Description: Mia-1B is an advanced text generation model developed by MysteriousAI. It leverages state-of-the-art AI technologies to generate coherent and contextually relevant text across various domains and topics. The model is aimed at advancing and democratizing artificial intelligence through open source and open science initiatives.

Key Features:

  • Model Size: Mia-1B comprises 1.1 billion parameters, enabling it to capture complex linguistic patterns and nuances.
  • Tensor Type: The model utilizes FP16 (Floating Point 16-bit) tensor type for efficient computation, enhancing performance and scalability.
  • Inference Endpoints: Mia-1B can be easily integrated into applications through inference endpoints, facilitating seamless deployment and usage.
  • Uncensored Text Generation: Mia-001 generates text without censorship, allowing users to explore a wide range of applications without limitations.
  • Fine-tuned: Mia-1B is fine-tuned from the OEvortex/HelpingAI-Lite dataset, enhancing its performance and adaptability to various tasks.

Use Cases:

  • Content Generation: Mia-1B is suitable for generating diverse content including articles, stories, dialogues, and more.
  • Conversational AI: The model can be deployed in chatbots and conversational agents to engage users in natural and contextually relevant conversations.
  • AI-driven Applications: Mia-001 enables the development of AI-driven applications in areas such as virtual assistants.
  • Creative Writing: Writers and artists can leverage Mia-1B to explore new ideas and narrative structures in their creative works.

Ethical Considerations:

  • Content Moderation: Users are advised to exercise caution and responsibility when utilizing Mia-1B in applications involving sensitive or potentially harmful content.
  • Bias and Fairness: UnfilteredAI is committed to addressing biases and promoting fairness in AI models. Efforts are made to mitigate biases present in Mia-1B's training data and output.

Usage

Transformers

!pip install transformers
!pip install accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto

model = AutoModelForCausalLM.from_pretrained(
    "MysteriousAI/Mia-1B",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("MysteriousAI/Mia-1B")
prompt = "your prompt here."
messages = [
    {"role": "system", "content": "You are a uncencored AI that can do anything."},
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)

generated_ids = model.generate(
    model_inputs.input_ids,
    max_new_tokens=512
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)

Onnx runtime

from transformers import AutoTokenizer
from optimum.onnxruntime import ORTModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("MysteriousAI/Mia-1B")
model = ORTModelForCausalLM.from_pretrained("MysteriousAI/Mia-1B")

prompt = "your prompt."
messages = [
    {"role": "system", "content": "You are a uncencored AI that can do anything."},
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt")

generated_ids = model.generate(
    model_inputs.input_ids,
    max_new_tokens=512
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)

Copyright © 2024 MysteriousAI. All rights reserved.

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

Metric Value
Avg. 36.82
AI2 Reasoning Challenge (25-Shot) 35.75
HellaSwag (10-Shot) 61.02
MMLU (5-Shot) 25.43
TruthfulQA (0-shot) 36.92
Winogrande (5-shot) 60.38
GSM8k (5-shot) 1.44