AstraQuasar-4B
is our first pre-trained Large Language Model (LLM) for text generation.
It is a model with
4B parameters
, whithout embeddings.
AstraQuasar-4B-v.0.1 is built upon the foundation of the Phi-2 architecture, with
significant enhancements including an increased number of layers and the innovative introduction of a novel technique known as the duplicate trick.
AstraQuasar-4B-v.0.1 at the moment is an under trained model. Serving as a demonstration of the potential of the duplication trick and its implications for future advancements in language modeling. Despite its nascent status, our model has already demonstrated superior performance compared to both the base Phi-2 model and earlier iterations of AstraQuasar-4B that do not utilize the duplication trick.
One of the key milestones achieved by AstraQuasar-4B is its successful application of backpropagation on the duplication trick, setting a precedent for future research and development in this area.
The use of the duplicate trick had shown to instantly decrease the loss by ~21% with no added instability
Our model's architecture is fully compatible with leading training frameworks such as
Axolotl
and
LLaMA Factory
, ensuring seamless integration into existing workflows leveraging the standard Hugging Face Transformers library.
Example:
AstraQuasar-4B can be easily instantiated using the Hugging Face Transformers library:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model = AutoModelForCausalLM.from_pretrained("AstraMindAI/AstraQuasar-4B", torch_dtype=torch.float16, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("AstraMindAI/AstraQuasar-4B")
# you can optionally disable the duplicate trick# model.model.duplicate_trick = False# you can also disable the duplicate gradient calculation during training# model.model.duplicate_grad = False# You can specify the layer ranges for the duplicate trick# model.model.layer_ranges = [(0, 16),(8, 24),(17, 32),(25, 40),(33, 49),(40, 56)]
prompt = "I love my dog because "
inputs = tokenizer(prompt, return_tensors="pt")
# Generate
generate_ids = model.generate(inputs.input_ids, max_length=30)
tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
Pre-training and fine-tuning can be performed using
accelerate
or
deepspeed
.
Notice
It's important to note that AstraQuasar-4B is a pre-trained base model and does not incorporate any moderation mechanisms.
NEWS
Stay tuned for exciting developments! A new architecture,
AstraPulsar
, is on the horizon, promising further advancements in language modeling.
Credits:
Undi95
for helping us figuring out the process of self-calling layers.
Runs of AstraMindAI AstraQuasar-4B on huggingface.co
108
Total runs
4
24-hour runs
3
3-day runs
11
7-day runs
51
30-day runs
More Information About AstraQuasar-4B huggingface.co Model
AstraQuasar-4B huggingface.co is an AI model on huggingface.co that provides AstraQuasar-4B's model effect (), which can be used instantly with this AstraMindAI AstraQuasar-4B model. huggingface.co supports a free trial of the AstraQuasar-4B model, and also provides paid use of the AstraQuasar-4B. Support call AstraQuasar-4B model through api, including Node.js, Python, http.
AstraQuasar-4B huggingface.co is an online trial and call api platform, which integrates AstraQuasar-4B's modeling effects, including api services, and provides a free online trial of AstraQuasar-4B, you can try AstraQuasar-4B online for free by clicking the link below.
AstraMindAI AstraQuasar-4B online free url in huggingface.co:
AstraQuasar-4B is an open source model from GitHub that offers a free installation service, and any user can find AstraQuasar-4B on GitHub to install. At the same time, huggingface.co provides the effect of AstraQuasar-4B install, users can directly use AstraQuasar-4B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.