--- license: apache-2.0 language: - en - ja pipeline_tag: text-generation library_name: transformers base_model: pfnet/plamo-2-1b tags: - mlx --- # mlx-community/plamo-2-1b The Model [mlx-community/plamo-2-1b](https://huggingface.co/mlx-community/plamo-2-1b) was converted to MLX format from [pfnet/plamo-2-1b](https://huggingface.co/pfnet/plamo-2-1b) using mlx-lm version **0.21.0**. ## Use with mlx ```bash pip install mlx numba # numba is required for the new PLaMo tokenizer pip install "git+https://github.com/mitmul/mlx-examples.git@mitmul/add-plamo2-1b-support#egg=mlx-lm&subdirectory=llms" ``` ```bash python -m mlx_lm.generate \ --model mlx-community/plamo-2-1b \ --prompt '美味しいカレーの作り方 のレシピを紹介します。' \ --max-tokens 1024 \ --extra-eos-token '<|plamo:bos|>' \ --ignore-chat-template \ --temp 0 Fetching 7 files: 100%|█████████████████████████████████████████████████████████████████████| 7/7 [00:00<00:00, 116508.44it/s] ========== ## 美味しいカレーの作り方 ### 材料 - 玉ねぎ 1個 - にんじん 1本 - じゃがいも 1個 - 豚ひき肉 100g - にんにく 1かけ - しょうが 1かけ - カレー粉 大さじ1 - 塩 小さじ1 - 水 100cc - トマト缶 1缶 - 水 100cc - サラダ油 大さじ1 - 塩 少々 - こしょう 少々 ### 作り方 - 玉ねぎ、にんじん、じゃがいも、にんにく、しょうがをみじん切りにします。 - フライパンにサラダ油を熱し、にんにく、しょうがを炒めます。 - 香りが出てきたら、玉ねぎ、にんじん、じゃがいも、豚ひき肉、塩、こしょう、水、トマト缶、水、カレー粉を入れて炒めます。 - 野菜に火が通ったら、カレー粉を溶かします。 - 水、塩、こしょうで味を調えます。 - 最後にトマト缶を加えて、煮込んで完成です。 ## まとめ 美味しいカレーの作り方のレシピを紹介しました。 ぜひ参考にしてみてください。 ========== Prompt: 8 tokens, 114.293 tokens-per-sec Generation: 234 tokens, 67.785 tokens-per-sec Peak memory: 2.727 GB ``` You can also write your code to use this model like this: ```python from mlx_lm import load, generate model, tokenizer = load("mlx-community/plamo-2-1b") prompt = "美味しいカレーの作り方のレシピを紹介します。" response = generate(model, tokenizer, prompt=prompt, verbose=True) ```