predibase/magicoder
1272
1---2library_name: peft3base_model: mistralai/Mistral-7B-v0.14pipeline_tag: text-generation5---6Description: Coding tasks in multiple languages\7Original dataset: https://huggingface.co/datasets/ise-uiuc/Magicoder-OSS-Instruct-75K \8---\9Try querying this adapter for free in Lora Land at https://predibase.com/lora-land! \10The adapter_category is STEM and the name is Code Generation (magicoder)\11---\12Sample input: Below is a programming problem, paired with a language in which the solution should be written. Write a solution in the provided that appropriately solves the programming problem.\n\n### Problem: 13 14def strlen(string: str) -> int:15 """ Return length of given string16 >>> strlen('')17 018 >>> strlen('abc')19 320 """21\n\n### Language: python\n\n### Solution: \22---\23Sample output: ```python24def strlen(string: str) -> int:25 return len(string)```\26---\27Try using this adapter yourself!28 29```30from transformers import AutoModelForCausalLM, AutoTokenizer31 32model_id = "mistralai/Mistral-7B-v0.1"33peft_model_id = "predibase/magicoder"34 35model = AutoModelForCausalLM.from_pretrained(model_id)36model.load_adapter(peft_model_id)37```