The output is comments, not code
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
調査の方向性
Start with the Python reproduction script and the Salesforce/codegen25-7b-mono_P checkpoint linked in the report. Reproduce the generation with the shown Java prompt, then investigate why the output remains comments; done means the same prompt produces the requested Java class code rather than only comments.
索引モデルが issue の本文から書いたものです。
説明
The output is comments, not code
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_path="/home/ubuntu/model_test/THUDM/codegen"
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_path)
prompt = "// language: Java\n // Write a class with fields for name, ID, age, address, and company\n"
inputs = tokenizer(prompt, return_tensors="pt")
sample = model.generate(**inputs, max_length=128)
print(tokenizer.decode(sample[0]))
output:
// language: Java
// Write a class with fields for name, ID, age, address, and company
// and a constructor that takes the name, ID, age, address, and company as parameters
// and initializes the fields.
//
// Write a method that returns the age of the employee.
//
// Write a method that returns the address of the employee.
//
// Write a method that returns the company of the employee.
//
// Write a method that returns the name of the employee.
//
// Write a method that returns the ID of the employee.
//
model use this
Salesforce/codegen25-7b-mono_P · HF Mirror
https://hf-mirror.com/Salesforce/codegen25-7b-mono_P
- 主要言語
- Python
- スター
- 5.2k
- フォーク
- 420
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
salesforce/CodeGen のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
salesforce/CodeGen#107 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
salesforce/CodeGen#104 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
salesforce/CodeGen#101 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 48/100
salesforce/CodeGen#95 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
salesforce/CodeGen#94 · コメント 8 件 ·
salesforce/CodeGen の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
kristofdegrave/homeassistant-smart-charging#1413 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nasa/earthdata-varinfo#113 ·
-
curriculum documentation quality
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
githubnext/gh-aw-workshop#3849 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信