How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="blockblockblock/Code-Mistral-7B-bpw3")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("blockblockblock/Code-Mistral-7B-bpw3")
model = AutoModelForCausalLM.from_pretrained("blockblockblock/Code-Mistral-7B-bpw3")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Code-Mistral-7B

This Model is trained on refined version of my dataset Code-290k-ShareGPT. Besides this it is trained on following datasets:

Code-Feedback

orca-math-word-problems-200k

Openhermes

The idea was to check how this Model will perform with both Code & Maths datasets. This model is very good with Coding. Maths is still hit & miss but you can test out this model.

This Model is trained on massive datasets so the results are very good. I have used ChatML prompt format.

Kindly note this is qLoRA version, a rare exception.

Training: Entire dataset was trained on 4 x A100 80GB. For 3 epoch, training took almost 33 Hours. Axolotl codebase was used for training purpose. Entire data is trained on Mistral.

Example Prompt: This model uses ChatML prompt format.

<|im_start|>system
You are a helpful AI assistant.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant

You can modify above Prompt as per your requirement.

I want to say special Thanks to the Open Source community for helping & guiding me to better understand the AI/Model development.

Thank you for your love & support.

Example Output

C++

image/jpeg

Error Resolving

image/jpeg

Matrices

image/jpeg

Machine Learning

image/jpeg

Downloads last month
9
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train blockblockblock/Code-Mistral-7B-bpw3