GraySoft
Projects Models About FAQ Contact Download guIDE →
Model Intelligence Sheet

richarderkhov/indy1985_-_lora_template_unsloth_1_lora-gguf overview

Comprehensive model page for richarderkhov/indy1985-loratemplateunsloth1lora-gguf

ggufarxiv:1910.09700endpoints_compatibleregion:us
richarderkhov/indy1985_-_lora_template_unsloth_1_lora-gguf visual
Downloads
108
Likes
0
Pipeline
Library
Visibility
Public
Access
Open

Repository Files & Downloads

22 files detected
Direct downloads for all repository files
FileTypeQuantizationSizeLink
LoRA_template_unsloth_1_lora.IQ3_M.gguf GGUF IQ3_M 89.86 MB Download
LoRA_template_unsloth_1_lora.IQ3_S.gguf GGUF IQ3_S 85.97 MB Download
LoRA_template_unsloth_1_lora.IQ3_XS.gguf GGUF IQ3_XS 85.02 MB Download
LoRA_template_unsloth_1_lora.IQ4_NL.gguf GGUF IQ4_NL 101.90 MB Download
LoRA_template_unsloth_1_lora.IQ4_XS.gguf GGUF IQ4_XS 98.29 MB Download
LoRA_template_unsloth_1_lora.Q2_K.gguf GGUF Q2_K 77.43 MB Download
LoRA_template_unsloth_1_lora.Q3_K.gguf GGUF Q3_K 93.14 MB Download
LoRA_template_unsloth_1_lora.Q3_K_L.gguf GGUF Q3_K_L 97.36 MB Download
LoRA_template_unsloth_1_lora.Q3_K_M.gguf GGUF Q3_K_M 93.14 MB Download
LoRA_template_unsloth_1_lora.Q3_K_S.gguf GGUF Q3_K_S 85.97 MB Download
LoRA_template_unsloth_1_lora.Q4_0.gguf GGUF 101.62 MB Download
LoRA_template_unsloth_1_lora.Q4_1.gguf GGUF 108.98 MB Download
LoRA_template_unsloth_1_lora.Q4_K.gguf GGUF Q4_K 107.63 MB Download
LoRA_template_unsloth_1_lora.Q4_K_M.gguf GGUF Q4_K_M 107.63 MB Download
LoRA_template_unsloth_1_lora.Q4_K_S.gguf GGUF Q4_K_S 101.90 MB Download
LoRA_template_unsloth_1_lora.Q5_0.gguf GGUF 116.34 MB Download
LoRA_template_unsloth_1_lora.Q5_1.gguf GGUF 123.71 MB Download
LoRA_template_unsloth_1_lora.Q5_K.gguf GGUF Q5_K 120.83 MB Download
LoRA_template_unsloth_1_lora.Q5_K_M.gguf GGUF Q5_K_M 120.83 MB Download
LoRA_template_unsloth_1_lora.Q5_K_S.gguf GGUF Q5_K_S 116.34 MB Download
LoRA_template_unsloth_1_lora.Q6_K.gguf GGUF Q6_K 131.99 MB Download
LoRA_template_unsloth_1_lora.Q8_0.gguf GGUF 169.44 MB Download

Model Details Live

Model Slug
richarderkhov/indy1985_-_lora_template_unsloth_1_lora-gguf
Author
RichardErkhov
Pipeline Task
Library
Created
2025-03-01
Last Modified
2025-03-01
Gated
No
Private
No
HF SHA
1abd0acb16a1ce114f7e1312c9f07dc4a326ee8b
License
Unknown
Language
Unknown
Base Model
Unknown

Metadata Inspector

Normalized metadata (stored in metadata_json)
{
  "metadata": {},
  "card_data": {
    "frontmatter": {},
    "hero_image_url": "",
    "summary": "",
    "quick_links": [],
    "benchmark_table_html": "",
    "readme_markdown": "Quantization made by Richard Erkhov.\n\n[Github](https://github.com/RichardErkhov)\n\n[Discord](https://discord.gg/pvy7H8DZMG)\n\n[Request more models](https://github.com/RichardErkhov/quant_request)\n\n\nLoRA_template_unsloth_1_lora - GGUF\n- Model creator: https://huggingface.co/Indy1985/\n- Original model: https://huggingface.co/Indy1985/LoRA_template_unsloth_1_lora/\n\n\n| Name | Quant method | Size |\n| ---- | ---- | ---- |\n| [LoRA_template_unsloth_1_lora.Q2_K.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q2_K.gguf) | Q2_K | 0.08GB |\n| [LoRA_template_unsloth_1_lora.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.IQ3_XS.gguf) | IQ3_XS | 0.08GB |\n| [LoRA_template_unsloth_1_lora.IQ3_S.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.IQ3_S.gguf) | IQ3_S | 0.08GB |\n| [LoRA_template_unsloth_1_lora.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q3_K_S.gguf) | Q3_K_S | 0.08GB |\n| [LoRA_template_unsloth_1_lora.IQ3_M.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.IQ3_M.gguf) | IQ3_M | 0.09GB |\n| [LoRA_template_unsloth_1_lora.Q3_K.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q3_K.gguf) | Q3_K | 0.09GB |\n| [LoRA_template_unsloth_1_lora.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q3_K_M.gguf) | Q3_K_M | 0.09GB |\n| [LoRA_template_unsloth_1_lora.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q3_K_L.gguf) | Q3_K_L | 0.1GB |\n| [LoRA_template_unsloth_1_lora.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.IQ4_XS.gguf) | IQ4_XS | 0.1GB |\n| [LoRA_template_unsloth_1_lora.Q4_0.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q4_0.gguf) | Q4_0 | 0.1GB |\n| [LoRA_template_unsloth_1_lora.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.IQ4_NL.gguf) | IQ4_NL | 0.1GB |\n| [LoRA_template_unsloth_1_lora.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q4_K_S.gguf) | Q4_K_S | 0.1GB |\n| [LoRA_template_unsloth_1_lora.Q4_K.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q4_K.gguf) | Q4_K | 0.11GB |\n| [LoRA_template_unsloth_1_lora.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q4_K_M.gguf) | Q4_K_M | 0.11GB |\n| [LoRA_template_unsloth_1_lora.Q4_1.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q4_1.gguf) | Q4_1 | 0.11GB |\n| [LoRA_template_unsloth_1_lora.Q5_0.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q5_0.gguf) | Q5_0 | 0.11GB |\n| [LoRA_template_unsloth_1_lora.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q5_K_S.gguf) | Q5_K_S | 0.11GB |\n| [LoRA_template_unsloth_1_lora.Q5_K.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q5_K.gguf) | Q5_K | 0.12GB |\n| [LoRA_template_unsloth_1_lora.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q5_K_M.gguf) | Q5_K_M | 0.12GB |\n| [LoRA_template_unsloth_1_lora.Q5_1.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q5_1.gguf) | Q5_1 | 0.12GB |\n| [LoRA_template_unsloth_1_lora.Q6_K.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q6_K.gguf) | Q6_K | 0.13GB |\n| [LoRA_template_unsloth_1_lora.Q8_0.gguf](https://huggingface.co/RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf/blob/main/LoRA_template_unsloth_1_lora.Q8_0.gguf) | Q8_0 | 0.17GB |\n\n\n\n\nOriginal model description:\n---\nlibrary_name: transformers\ntags: []\n---\n\n# Model Card for Model ID\n\n<!-- Provide a quick summary of what the model is/does. -->\n\n\n\n## Model Details\n\n### Model Description\n\n<!-- Provide a longer summary of what this model is. -->\n\nThis is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.\n\n- **Developed by:** [More Information Needed]\n- **Funded by [optional]:** [More Information Needed]\n- **Shared by [optional]:** [More Information Needed]\n- **Model type:** [More Information Needed]\n- **Language(s) (NLP):** [More Information Needed]\n- **License:** [More Information Needed]\n- **Finetuned from model [optional]:** [More Information Needed]\n\n### Model Sources [optional]\n\n<!-- Provide the basic links for the model. -->\n\n- **Repository:** [More Information Needed]\n- **Paper [optional]:** [More Information Needed]\n- **Demo [optional]:** [More Information Needed]\n\n## Uses\n\n<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->\n\n### Direct Use\n\n<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->\n\n[More Information Needed]\n\n### Downstream Use [optional]\n\n<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->\n\n[More Information Needed]\n\n### Out-of-Scope Use\n\n<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->\n\n[More Information Needed]\n\n## Bias, Risks, and Limitations\n\n<!-- This section is meant to convey both technical and sociotechnical limitations. -->\n\n[More Information Needed]\n\n### Recommendations\n\n<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->\n\nUsers (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.\n\n## How to Get Started with the Model\n\nUse the code below to get started with the model.\n\n[More Information Needed]\n\n## Training Details\n\n### Training Data\n\n<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->\n\n[More Information Needed]\n\n### Training Procedure\n\n<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->\n\n#### Preprocessing [optional]\n\n[More Information Needed]\n\n\n#### Training Hyperparameters\n\n- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->\n\n#### Speeds, Sizes, Times [optional]\n\n<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->\n\n[More Information Needed]\n\n## Evaluation\n\n<!-- This section describes the evaluation protocols and provides the results. -->\n\n### Testing Data, Factors & Metrics\n\n#### Testing Data\n\n<!-- This should link to a Dataset Card if possible. -->\n\n[More Information Needed]\n\n#### Factors\n\n<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->\n\n[More Information Needed]\n\n#### Metrics\n\n<!-- These are the evaluation metrics being used, ideally with a description of why. -->\n\n[More Information Needed]\n\n### Results\n\n[More Information Needed]\n\n#### Summary\n\n\n\n## Model Examination [optional]\n\n<!-- Relevant interpretability work for the model goes here -->\n\n[More Information Needed]\n\n## Environmental Impact\n\n<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->\n\nCarbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).\n\n- **Hardware Type:** [More Information Needed]\n- **Hours used:** [More Information Needed]\n- **Cloud Provider:** [More Information Needed]\n- **Compute Region:** [More Information Needed]\n- **Carbon Emitted:** [More Information Needed]\n\n## Technical Specifications [optional]\n\n### Model Architecture and Objective\n\n[More Information Needed]\n\n### Compute Infrastructure\n\n[More Information Needed]\n\n#### Hardware\n\n[More Information Needed]\n\n#### Software\n\n[More Information Needed]\n\n## Citation [optional]\n\n<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->\n\n**BibTeX:**\n\n[More Information Needed]\n\n**APA:**\n\n[More Information Needed]\n\n## Glossary [optional]\n\n<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->\n\n[More Information Needed]\n\n## More Information [optional]\n\n[More Information Needed]\n\n## Model Card Authors [optional]\n\n[More Information Needed]\n\n## Model Card Contact\n\n[More Information Needed]\n\n\n# Sample Use\n\n以下は、elyza-tasks-100-TV_0.jsonlの回答のためのコードです。\n```python\n# Google Colab の場合は上記の環境構築手順を行なわず、単にこのセルから実行していってください。\n!pip uninstall unsloth -y\n!pip install --upgrade --no-cache-dir \"unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git\"\n\n\n# Google Colab のデフォルトで入っているパッケージをアップグレード(Moriyasu さんありがとうございます)\n!pip install --upgrade torch\n!pip install --upgrade xformers\n\n\n# notebookでインタラクティブな表示を可能とする(ただし、うまく動かない場合あり)\n# Google Colabでは実行不要\n!pip install ipywidgets --upgrade\n\n\n# Install Flash Attention 2 for softcapping support\nimport torch\nif torch.cuda.get_device_capability()[0] >= 8:\n    !pip install --no-deps packaging ninja einops \"flash-attn>=2.6.3\"\n\n\n# Hugging Face Token を指定\n# 下記の URL から Hugging Face Token を取得できますので下記の HF_TOKEN に入れてください。\n# Write権限を付与してください。\n# https://huggingface.co/settings/tokens\nHF_TOKEN = \"your-token\" #@param {type:\"string\"}\n\n# あるいは Google Colab シークレットを使う場合、左のサイドバーより🔑マークをクリック\n# HF_TOKEN という名前で Value に Hugging Face Token を入れてください。\n# ノートブックからのアクセスのトグルをオンにし、下記の二行のコードのコメントアウトを外してください。\n\n# from google.colab import userdata\n# HF_TOKEN=userdata.get('HF_TOKEN')\n\n\n# llm-jp/llm-jp-3-13bを4bit量子化のqLoRA設定でロード。\n\nfrom unsloth import FastLanguageModel\nimport torch\nmax_seq_length = 512 # unslothではRoPEをサポートしているのでコンテキスト長は自由に設定可能\ndtype = None # Noneにしておけば自動で設定\nload_in_4bit = True # 今回は13Bモデルを扱うためTrue\n\nmodel_id = \"llm-jp/llm-jp-3-13b\"\nnew_model_id = \"llm-jp-3-13b-it\" #Fine-Tuningしたモデルにつけたい名前、it: Instruction Tuning\n# FastLanguageModel インスタンスを作成\nmodel, tokenizer = FastLanguageModel.from_pretrained(\n    model_name=model_id,\n    dtype=dtype,\n    load_in_4bit=load_in_4bit,\n    trust_remote_code=True,\n)\n\n# SFT用のモデルを用意\nmodel = FastLanguageModel.get_peft_model(\n    model,\n    r = 32,\n    target_modules = [\"q_proj\", \"k_proj\", \"v_proj\", \"o_proj\",\n                      \"gate_proj\", \"up_proj\", \"down_proj\",],\n    lora_alpha = 32,\n    lora_dropout = 0.05,\n    bias = \"none\",\n    use_gradient_checkpointing = \"unsloth\",\n    random_state = 3407,\n    use_rslora = False,\n    loftq_config = None,\n    max_seq_length = max_seq_length,\n)\n\n\nfrom datasets import load_dataset\n\ndataset = load_dataset(\"json\", data_files=\"/content/news_summaries.jsonl\")\n# パスの指定にご注意ください。アップロードしたファイルを右クリックし、「パスをコピー」をクリック、上記の data_files と合致していることをご確認ください。Omnicampus のディレクトリ構造とは異なるかもしれません。\n\n\n# データセットのカラム名を確認\nprint(\"Dataset columns:\", dataset.column_names)\n\n# 安全なフォーマット関数を定義\ndef formatting_prompts_func(examples):\n    try:\n        # 動的にキーを判定\n        key = \"text\" if \"text\" in examples else next(iter(examples.keys()))\n        input_text = examples[key]\n        # カスタム処理\n        return {\"formatted_text\": f\"Processed: {input_text}\"}\n    except KeyError:\n        print(f\"Key error for examples: {examples}\")\n        return {}\n\n# フィルタリング(必要に応じて)\nif \"text\" not in dataset.column_names:\n    print(\"Warning: 'text' column not found. Filtering dataset...\")\n    dataset = dataset.filter(lambda example: \"text\" in example)\n\n# map を適用\ndataset = dataset.map(\n    formatting_prompts_func,\n    num_proc=4  # 並列処理\n)\n\n# 処理結果を確認\nprint(dataset)\n\n\n# データセットのカラムを確認\nprint(dataset.column_names)  # 現在のカラム名を表示\n\n# `formatting_prompts_func`の修正\ndef formatting_prompts_func(examples):\n    # ここでは 'summary' カラムを使用\n    input_data = examples[\"summary\"]  # 入力データを 'summary' から取得\n    # ここでinput_dataを使った処理を続ける\n    return {\"formatted_summary\": input_data}  # フォーマットした結果を返す\n\n# 各データにフォーマットを適用\ndataset = dataset.map(\n    formatting_prompts_func,\n    num_proc=4,  # 並列処理数を指定\n)\n\n# 結果を確認\nprint(dataset)\n\n\nfrom datasets import load_dataset\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\nfrom trl import SFTTrainer\nimport logging\n\n# ロギングの設定 - デバッグに非常に有効\nlogging.basicConfig(level=logging.INFO)\nlogger = logging.getLogger(__name__)\n\ndef prepare_dataset(dataset_name, split='train'):\n    try:\n        # データセットの読み込み\n        dataset = load_dataset(dataset_name, split=split)\n        \n        # データセットの存在と内容の確認\n        if len(dataset) == 0:\n            logger.error(f\"データセット {dataset_name} が空です。\")\n            raise ValueError(\"データセットにデータがありません。\")\n        \n        logger.info(f\"データセットのサイズ: {len(dataset)}\")\n        logger.info(f\"データセットの最初のサンプル: {dataset[0]}\")\n        \n        return dataset\n    \n    except Exception as e:\n        logger.error(f\"データセット読み込み中にエラーが発生: {e}\")\n        raise\n\ndef prepare_model_and_tokenizer(model_name):\n    try:\n        tokenizer = AutoTokenizer.from_pretrained(model_name)\n        model = AutoModelForCausalLM.from_pretrained(model_name)\n        \n        return model, tokenizer\n    \n    except Exception as e:\n        logger.error(f\"モデルとトークナイザーの読み込み中にエラーが発生: {e}\")\n        raise\n\ndef main():\n    try:\n        # データセットとモデルの設定\n        dataset_name = \"your_dataset_name\"  # 実際のデータセット名に置き換えてください\n        model_name = \"your_base_model\"     # 使用するモデル名に置き換えてください\n        \n        # データセットの準備\n        train_dataset = prepare_dataset(dataset_name)\n        \n        # モデルとトークナイザーの準備\n        model, tokenizer = prepare_model_and_tokenizer(model_name)\n        \n        # トレーナーの設定\n        trainer = SFTTrainer(\n            model=model,\n            tokenizer=tokenizer,\n            train_dataset=train_dataset,\n            dataset_text_field=\"text\",  # データセットの適切なテキストフィールドに置き換えてください\n            max_seq_length=512\n        )\n        \n        # トレーニングの開始\n        trainer.train()\n    \n    except Exception as e:\n        logger.error(f\"トレーニング中に致命的なエラーが発生: {e}\")\n\nif __name__ == \"__main__\":\n    main()\n\n\n#@title 現在のメモリ使用量を表示\ngpu_stats = torch.cuda.get_device_properties(0)\nstart_gpu_memory = round(torch.cuda.max_memory_reserved() / 1024 / 1024 / 1024, 3)\nmax_memory = round(gpu_stats.total_memory / 1024 / 1024 / 1024, 3)\nprint(f\"GPU = {gpu_stats.name}. Max memory = {max_memory} GB.\")\nprint(f\"{start_gpu_memory} GB of memory reserved.\")\n\n\nfrom transformers import AutoTokenizer, GPT2LMHeadModel\n\n# ドキュメントをトークナイザーで準備\ntokenizer = AutoTokenizer.from_pretrained(\"gpt2\")  # 適切なモデル名を使用\ntokenizer.add_special_tokens({'pad_token': '[PAD]'})  # パディングトークンを設定\n\nmodel = GPT2LMHeadModel.from_pretrained(\"gpt2\")  # 同じモデルをロード\nmodel.resize_token_embeddings(len(tokenizer))  # トークン数をモデルに反映\n\ndef preprocess_data(examples):\n    return tokenizer(examples[\"text\"], truncation=True, padding=\"max_length\", max_length=128)\n\n# データセットをトークナイズ\ntokenized_dataset = dataset.map(preprocess_data, batched=True)\n\n\n# ELYZA-tasks-100-TVの読み込み。事前にファイルをアップロードしてください\n# データセットの読み込み。\n# omnicampusの開発環境では、左にタスクのjsonlをドラッグアンドドロップしてから実行。\nimport json\ndatasets = []\nwith open(\"/content//elyza-tasks-100-TV_0.jsonl\", \"r\") as f:\n    item = \"\"\n    for line in f:\n      line = line.strip()\n      item += line\n      if item.endswith(\"}\"):\n        datasets.append(json.loads(item))\n        item = \"\"\n\n\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\n# モデルとトークナイザーの準備\ntokenizer = AutoTokenizer.from_pretrained(\"gpt2\")  # 適切なモデル名を使用\nmodel = AutoModelForCausalLM.from_pretrained(\"gpt2\")\n\n# 入力データの準備\ninputs = tokenizer(\"ここに入力文を入れます\", return_tensors=\"pt\")\n\n# generateメソッドの呼び出し(無効な引数を削除)\noutputs = model.generate(\n    **inputs,\n    max_new_tokens=512,  # 新しく生成するトークンの最大数\n    use_cache=True,      # キャッシュを使用するか\n    do_sample=False,     # サンプリングを行うかどうか\n    repetition_penalty=1.2  # 繰り返しペナルティ\n)\n\n# 出力のデコード\nprediction = tokenizer.decode(outputs[0], skip_special_tokens=True).split('\\n### 回答')[-1]\nprint(prediction)\n\n\n# jsonlで保存\nwith open(f\"{new_model_id}_output.jsonl\", 'w', encoding='utf-8') as f:\n    for result in results:\n        json.dump(result, f, ensure_ascii=False)\n        f.write('\\n')\n\n\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\nfrom huggingface_hub import login, HfApi\n\n# Hugging Face Hubにアクセスするための認証トークンを設定\ntoken = \"your-token\"  # あなたのトークンをここに入力\nlogin(token=token)\n\n# モデルとトークナイザーの準備\nmodel_name = \"gpt2\"\ntokenizer = AutoTokenizer.from_pretrained(model_name)\nmodel = AutoModelForCausalLM.from_pretrained(model_name)\n\n# LoRAアダプタの設定(必要に応じて)\n# ここにLoRAの設定を追加\n\n# プライベートリポジトリにモデルを保存\nnew_model_id = \"LoRA_template_unsloth_1\"  # 保存するモデル名を指定\napi = HfApi()\n\n# リポジトリをプライベートとして作成\napi.create_repo(new_model_id + \"_lora\", private=True)\n\n# モデルとトークナイザーをHugging Face Hubにアップロード\nmodel.push_to_hub(new_model_id + \"_lora\", private=True)\ntokenizer.push_to_hub(new_model_id + \"_lora\", private=True)\n\nprint(f\"Model and tokenizer uploaded to the private repository: {new_model_id + '_lora'}\")\n```\n\n",
    "related_quantizations": []
  },
  "tags": [
    "gguf",
    "arxiv:1910.09700",
    "endpoints_compatible",
    "region:us"
  ],
  "likes": 0,
  "downloads": 108,
  "gated": false,
  "private": false,
  "last_modified": "2025-03-01T23:05:58.000Z",
  "created_at": "2025-03-01T23:03:04.000Z",
  "pipeline_tag": "",
  "library_name": ""
}
Source payload excerpt (from Hugging Face API)
{
  "_id": "67c39228a8ec9d71bf05c404",
  "id": "RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf",
  "modelId": "RichardErkhov/Indy1985_-_LoRA_template_unsloth_1_lora-gguf",
  "sha": "1abd0acb16a1ce114f7e1312c9f07dc4a326ee8b",
  "createdAt": "2025-03-01T23:03:04.000Z",
  "lastModified": "2025-03-01T23:05:58.000Z",
  "author": "RichardErkhov",
  "downloads": 108,
  "likes": 0,
  "gated": false,
  "private": false,
  "pipeline_tag": "",
  "library_name": "",
  "siblings_count": 24
}