Severian / Jamba-Hercules

huggingface.co
Total runs: 101
24-hour runs: 0
7-day runs: 4
30-day runs: 51
Model's Last Updated: April 30 2024
text-generation

Introduction of Jamba-Hercules

Model Details of Jamba-Hercules

Jamba-Hercules

Datset used: Locutusque/hercules-v4.0
- First 10k Examples
Example Output:
<|startoftext|><|im_start|>system 
You are a helpful AI assistant.
<|im_end|> 
<|im_start|>user
A tree needs to leave the earth and become astro-biological. How can it achieve it's goal?
<|im_end|> 
<|im_start|>assistant
The process of becoming astronautic life for a tree is an excemtally complicated one that requires a great deal of preparation, coordination, and funding. The first step in this process is for the tree to be identified as a potential candidate for astronautics, which may involve a thorough assessment of its size, health, and suitability for space travel.
Once a tree has been identified as a possible astronautic life-form, the next step involves preparing it for spaceflight. This includes training the tree to tolerate low gravity environments, teaching it how to navigate in zero gravity, and ensuring that its nutritional needs are met in space. The process of acclimating a tree to spaceflight can take months or even years, depending on the species and the specific requirements of each mission.
Once the tree has been adequately trained and prepared for spaceflight, it must then be transported into orbit or beyond. This may involve launching the tree aboard a rocket or shuttle, or using other methods such as balloons or parachutes to reach its destination. The journey itself can be long and arduous, with many potential risks and challenges along the way.
Upon arrival in space, the tree will need to be monitored closely and cared for by astronautic personnel. This may involve feeding the tree, maintaining its health and well-being, and ensuring that it has enough water and nutrients to survive. The tree may also need to be protected from radiation, extreme temperatures, or other hazards that it may face in space.
Over time, as the tree adapts to life in space, it will likely undergo some changes in its physical appearance and behavior. For example, it may begin growing in new ways, developing different kinds of leaves or branches in response to the unique environment it finds itself in. It may also become more active and mobile, using its roots to navigate and explore its new home.
Throughout this process, there are many challenges that need to be addressed and overcome.<|im_end|>
<|endoftext|>

Inference

※ - This code automatically appends the "<|startoftext|>" special token to any input. Appending this to all inputs is required for inference, as initial testing shows that leaving it out leads to output errors.


!pip install -qqq transformers>=4.39.0 mamba-ssm causal-conv1d>=1.2.0 accelerate bitsandbytes --progress-bar off
!pip install flash-attn --no-build-isolation

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

double_quant_config = BitsAndBytesConfig(
   load_in_4bit=True,
   bnb_4bit_use_double_quant=True,
   bnb_4bit_compute_dtype=torch.float16
)

model = AutoModelForCausalLM.from_pretrained(
    "Severian/Jamba-Hercules",
    device_map="auto",
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    attn_implementation="flash_attention_2",
    quantization_config=double_quant_config,
)
tokenizer = AutoTokenizer.from_pretrained("Severian/Jamba-Hercules")

input_text = """<|im_start|>system 
You are a helpful AI assistant.
<|im_end|> 
<|im_start|>user
A tree needs to leave the earth and become astro-biological. How can it achieve it's goal?
<|im_end|> 
<|im_start|>assistant
"""

input_ids = tokenizer(input_text, return_tensors='pt').to(model.device)["input_ids"]

outputs = model.generate(input_ids, max_new_tokens=1024, temperature=0.0, repetition_penalty=1.1)

print(tokenizer.batch_decode(outputs)[0])
# <|startoftext|><|im_start|>system 
# You are a helpful AI assistant.
# <|im_end|> 
# <|im_start|>user
# A tree needs to leave the earth and become astro-biological. How can it achieve it's goal?
# <|im_end|> 
# <|im_start|>assistant
# The process of becoming astronautic life for a tree is an excemtally complicated one that requires a great deal of preparation, coordination, and funding. The first step in this process is for the tree to be identified as a potential candidate for astronautics, which may involve a thorough assessment of its size, health, and suitability for space travel.
# Once a tree has been identified as a possible astronautic life-form, the next step involves preparing it for spaceflight. This includes training the tree to tolerate low gravity environments, teaching it how to navigate in zero gravity, and ensuring that its nutritional needs are met in space. The process of acclimating a tree to spaceflight can take months or even years, depending on the species and the specific requirements of each mission.
# Once the tree has been adequately trained and prepared for spaceflight, it must then be transported into orbit or beyond. This may involve launching the tree aboard a rocket or shuttle, or using other methods such as balloons or parachutes to reach its destination. The journey itself can be long and arduous, with many potential risks and challenges along the way.
# Upon arrival in space, the tree will need to be monitored closely and cared for by astronautic personnel. This may involve feeding the tree, maintaining its health and well-being, and ensuring that it has enough water and nutrients to survive. The tree may also need to be protected from radiation, extreme temperatures, or other hazards that it may face in space.
# Over time, as the tree adapts to life in space, it will likely undergo some changes in its physical appearance and behavior. For example, it may begin growing in new ways, developing different kinds of leaves or branches in response to the unique environment it finds itself in. It may also become more active and mobile, using its roots to navigate and explore its new home.
# Throughout this process, there are many challenges that need to be addressed and overcome.<|im_end|>
# <|endoftext|>

Training
Hercules-v4.0:

FIRST TEST:

  • 1250 Steps (5 hours x A100)
  • Final Loss: 0.98
Hyperparameters

lora_config = LoraConfig(
    r=16,
    lora_alpha=32,
    target_modules=["embed_tokens", "x_proj", "in_proj", "out_proj"],
    lora_dropout=0.05,
    task_type="CAUSAL_LM",
    bias="none"
)

trainer = SFTTrainer(
    model=model,
    train_dataset=train_dataset,
    dataset_text_field="text",
    max_seq_length=max_seq_length,
    tokenizer=tokenizer,
    args=TrainingArguments(
        num_train_epochs=1,
        lr_scheduler_type='cosine',
        learning_rate=0.0002,
        per_device_train_batch_size=1,
        gradient_accumulation_steps=8,
        gradient_checkpointing=True,
        warmup_steps=10,
        weight_decay=0.01,
        fp16=not torch.cuda.is_bf16_supported(),
        bf16=torch.cuda.is_bf16_supported(),
        logging_steps=1,
        save_steps=200,
        output_dir="outputs",
        optim="adamw_bnb_8bit",
        adam_epsilon=0.00001,
        adam_beta2=0.95,
        max_grad_norm=1.0,
        seed=42,
    ),
)

Runs of Severian Jamba-Hercules on huggingface.co

101
Total runs
0
24-hour runs
-2
3-day runs
4
7-day runs
51
30-day runs

More Information About Jamba-Hercules huggingface.co Model

More Jamba-Hercules license Visit here:

https://choosealicense.com/licenses/apache-2.0

Jamba-Hercules huggingface.co

Jamba-Hercules huggingface.co is an AI model on huggingface.co that provides Jamba-Hercules's model effect (), which can be used instantly with this Severian Jamba-Hercules model. huggingface.co supports a free trial of the Jamba-Hercules model, and also provides paid use of the Jamba-Hercules. Support call Jamba-Hercules model through api, including Node.js, Python, http.

Jamba-Hercules huggingface.co Url

https://huggingface.co/Severian/Jamba-Hercules

Severian Jamba-Hercules online free

Jamba-Hercules huggingface.co is an online trial and call api platform, which integrates Jamba-Hercules's modeling effects, including api services, and provides a free online trial of Jamba-Hercules, you can try Jamba-Hercules online for free by clicking the link below.

Severian Jamba-Hercules online free url in huggingface.co:

https://huggingface.co/Severian/Jamba-Hercules

Jamba-Hercules install

Jamba-Hercules is an open source model from GitHub that offers a free installation service, and any user can find Jamba-Hercules on GitHub to install. At the same time, huggingface.co provides the effect of Jamba-Hercules install, users can directly use Jamba-Hercules installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Jamba-Hercules install url in huggingface.co:

https://huggingface.co/Severian/Jamba-Hercules

Url of Jamba-Hercules

Jamba-Hercules huggingface.co Url

Provider of Jamba-Hercules huggingface.co

Severian
ORGANIZATIONS

Other API from Severian

huggingface.co

Total runs: 61
Run Growth: 16
Growth Rate: 26.23%
Updated:February 08 2024
huggingface.co

Total runs: 43
Run Growth: 42
Growth Rate: 97.67%
Updated:February 08 2024
huggingface.co

Total runs: 25
Run Growth: 6
Growth Rate: 24.00%
Updated:April 09 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 08 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 08 2025