Helsinki-NLP/opus_paracrawl
Viewer • Updated • 27.3M • 416 • 6
How to use lang-uk/dragoman-4bit with PEFT:
Task type is invalid.
How to use lang-uk/dragoman-4bit with MLX:
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm
# if on a CUDA device, also pip install mlx[cuda]
# Generate text with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("lang-uk/dragoman-4bit")
prompt = "Once upon a time in"
text = generate(model, tokenizer, prompt=prompt, verbose=True)How to use lang-uk/dragoman-4bit with MLX LM:
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "lang-uk/dragoman-4bit" --prompt "Once upon a time"
This model was converted to MLX format from the lang-uk/dragoman adapter fused into the mistralai/Mistral-7b-v0.1
base model and quantized into 4 bits using mlx-lm version 0.4.0.
Refer to the original model card for more details on the model.
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("lang-uk/dragoman-4bit")
response = generate(model, tokenizer, prompt="[INST] who holds this neighborhood? [/INST]", verbose=True)
Or use from your shell:
python -m mlx_lm.generate --model lang-uk/dragoman-4bit --prompt '[INST] who holds this neighborhood? [/INST]' --temp 0 --max-tokens 100
Quantized
Base model
mistralai/Mistral-7B-v0.1