Trelis / mamba-2.8b-slimpj-chat-4k

huggingface.co
Total runs: 14
24-hour runs: 0
7-day runs: 1
30-day runs: 4
Model's Last Updated: February 01 2024

Introduction of mamba-2.8b-slimpj-chat-4k

Model Details of mamba-2.8b-slimpj-chat-4k

Mamba Chat 4k

A fine-tune of the Mamba SlimPajama model

Issues:
  • Some answers are given in a different language than the question. This is likely due to the mixed language nature of the OpenAssist dataset. However, this usually isn't a problem for stronger models.
  • After roughly 3500 tokens of input, the model fails.
  • The model is poor at coding tasks.
  • Passkey retrieval works at up to around 3500 tokens, however, the model struggles to respond to anything but short questions/queries. Note that this is NOT an issue with the openhermes fine-tune
Chat Fine-tuning Config:

All modules were trained except the following were frozen:

"mixer", "conv1d", "act", "head"
Inference
pip install torch==2.1.0 transformers==4.35.0 causal-conv1d==1.0.0 mamba-ssm==1.0.1
import torch
from transformers import AutoTokenizer
from mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel

# Load the model and tokenizer
model_name = "Trelis/mamba-2.8b-slimpj-chat-4k"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = MambaLMHeadModel.from_pretrained(model_name, dtype=torch.bfloat16, device="cuda")

# Define the prompt
prompt = "what languages do you speak? answer me in english"

# Initialize an empty list for messages
messages = []

# Append the prompt to the messages list as a dictionary
messages.append(dict(role="user", content=prompt))

device='cuda'

formatted=tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
print(formatted)

# Prepare the input for the model
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(device)
max_length = input_ids.shape[1] + 500  # Assuming you want to generate 100 tokens

# Generate function for Mamba model
def generate_mamba(input_ids, max_length):
    return model.generate(
        input_ids=input_ids,
        max_length=max_length,
        cg=True,
        return_dict_in_generate=True,
        output_scores=True,
        enable_timing=False,
        temperature=0.01,
        top_k=1,
        top_p=1.0,
        eos_token_id=tokenizer.eos_token_id,
        repetition_penalty=1.0,
    )

# Run the generation
out = generate_mamba(input_ids, max_length)

# Decode and print the generated text
decoded_sequences = tokenizer.batch_decode(out.sequences.tolist())
for sequence in decoded_sequences:
    generated_text = sequence[len(tokenizer.decode(input_ids[0], skip_special_tokens=False)):]
    print(generated_text)

Runs of Trelis mamba-2.8b-slimpj-chat-4k on huggingface.co

14
Total runs
0
24-hour runs
0
3-day runs
1
7-day runs
4
30-day runs

More Information About mamba-2.8b-slimpj-chat-4k huggingface.co Model

More mamba-2.8b-slimpj-chat-4k license Visit here:

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

mamba-2.8b-slimpj-chat-4k huggingface.co

mamba-2.8b-slimpj-chat-4k huggingface.co is an AI model on huggingface.co that provides mamba-2.8b-slimpj-chat-4k's model effect (), which can be used instantly with this Trelis mamba-2.8b-slimpj-chat-4k model. huggingface.co supports a free trial of the mamba-2.8b-slimpj-chat-4k model, and also provides paid use of the mamba-2.8b-slimpj-chat-4k. Support call mamba-2.8b-slimpj-chat-4k model through api, including Node.js, Python, http.

mamba-2.8b-slimpj-chat-4k huggingface.co Url

https://huggingface.co/Trelis/mamba-2.8b-slimpj-chat-4k

Trelis mamba-2.8b-slimpj-chat-4k online free

mamba-2.8b-slimpj-chat-4k huggingface.co is an online trial and call api platform, which integrates mamba-2.8b-slimpj-chat-4k's modeling effects, including api services, and provides a free online trial of mamba-2.8b-slimpj-chat-4k, you can try mamba-2.8b-slimpj-chat-4k online for free by clicking the link below.

Trelis mamba-2.8b-slimpj-chat-4k online free url in huggingface.co:

https://huggingface.co/Trelis/mamba-2.8b-slimpj-chat-4k

mamba-2.8b-slimpj-chat-4k install

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

mamba-2.8b-slimpj-chat-4k install url in huggingface.co:

https://huggingface.co/Trelis/mamba-2.8b-slimpj-chat-4k

Url of mamba-2.8b-slimpj-chat-4k

mamba-2.8b-slimpj-chat-4k huggingface.co Url

Provider of mamba-2.8b-slimpj-chat-4k huggingface.co

Trelis
ORGANIZATIONS

Other API from Trelis

huggingface.co

Total runs: 617
Run Growth: 202
Growth Rate: 32.74%
Updated:July 21 2026
huggingface.co

Total runs: 70
Run Growth: 70
Growth Rate: 100.00%
Updated:November 21 2025
huggingface.co

Total runs: 55
Run Growth: 0
Growth Rate: 0.00%
Updated:September 18 2024
huggingface.co

Total runs: 12
Run Growth: 12
Growth Rate: 100.00%
Updated:September 24 2024
huggingface.co

Total runs: 8
Run Growth: -1
Growth Rate: -12.50%
Updated:November 26 2024