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:
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:
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 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:
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: