Comments (10)
请问是什么规模的模型(1b,7b,33b),用了什么类型的模型(base, instruct),大概补全了多少行
from deepseek-coder.
33b base, 6.7b base模型,case是50行左右。
from deepseek-coder.
测了一些例子,6.7b模型大概有30%的概率,会输出不停~
from deepseek-coder.
输出不停是指无法遇到还是说会重复输出同样的代码?
from deepseek-coder.
你可以试下Repetition penalty设为1.1,我们在使用补全插件的过程中,Repetition penalty设为1.1,体验会好一些
from deepseek-coder.
类似这个case
<|fim▁begin|>
package com.vitorpamplona.amethyst
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.util.LruCache
import androidx.core.net.toUri
import androidx.media3.common.C
import androidx.media3.common.Player
import androidx.media3.common.Player.STATE_IDLE
import androidx.media3.common.Player.STATE_READY
import androidx.media3.exoplayer.ExoPlayer
import androidx.media3.session.MediaSession
import com.vitorpamplona.amethyst.ui.MainActivity
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlin.math.abs
class MultiPlayerPlaybackManager(
private val dataSourceFactory: androidx.media3.exoplayer.source.MediaSource.Factory? = null,
private val cachedPositions: VideoViewedPositionCache
) {
// protects from LruCache killing playing sessions
private val playingMap = mutableMapOf<String, MediaSession>()
private val cache =
object : LruCache<String, MediaSession>(10) { // up to 10 videos in the screen at the same time
override fun entryRemoved(
evicted: Boolean,
key: String?,
oldValue: MediaSession?,
newValue: MediaSession?
) {
<|fim▁hole|>
}
}
private fun getCallbackIntent(callbackUri: String, applicationContext: Context): PendingIntent {
return PendingIntent.getActivity(
applicationContext,
0,
Intent(Intent.ACTION_VIEW, callbackUri.toUri(), applicationContext, MainActivity::class.java),
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
)
<|fim▁end|> if (evicted) {
oldValue?.release()
}
}
}
fun getSession(
videoUrl: String,
applicationContext: Context,
callbackUri: String,
onPlayerReady: (MediaSession) -> Unit
): MediaSession {
val session = cache.get(videoUrl)
if (session != null) {
return session
}
val newSession = MediaSession(applicationContext, videoUrl)
newSession.setCallback(object : MediaSession.Callback() {
override fun onPlay() {
super.onPlay()
playingMap[videoUrl] = newSession
}
override fun onPause() {
super.onPause()
playingMap.remove(videoUrl)
}
})
newSession.setMediaButtonEventReceiver(getCallbackIntent(callbackUri, applicationContext))
newSession.setPlaybackToLocal()
newSession.setRatingType(C.RATING_TYPE_NONE)
newSession.setPlayWhenReady(true)
val player = ExoPlayer.Builder(applicationContext).build()
player.addListener(object : Player.Listener {
override fun onPlaybackStateChanged(playbackState: Int) {
if (playbackState == STATE_READY) {
onPlayerReady(newSession)
}
}
})
newSession.setPlayer(player)
newSession.setMediaSource(dataSourceFactory?.createMediaSource(videoUrl.toUri()))
cache.put(videoUrl, newSession)
return newSession
}
fun release(videoUrl: String) {
cache.remove(videoUrl)
}
fun releaseAll() {
cache.evictAll()
}
fun getPlayingSession(): MediaSession? {
return playingMap.values.firstOrNull()
}
fun getPlayingSession(videoUrl: String): MediaSession? {
return playingMap[videoUrl]
}
fun getPlayingSession(videoUrl: String, onPlayerReady: (MediaSession) -> Unit) {
val session = playingMap[videoUrl]
if (session != null) {
onPlayerReady(session)
}
}
fun getPlayingSession(videoUrl: String, onPlayerReady: (MediaSession) -> Unit, onPlayerNotReady: () -> Unit) {
val session = playingMap[videoUrl]
if (session != null) {
onPlayerReady(session)
} else {
onPlayerNotReady()
}
}
fun getPlayingSession(videoUrl: String, onPlayerReady: (MediaSession) -> Unit, onPlayerNotReady: () -> Unit, onPlayerError: () -> Unit) {
val session = playingMap[videoUrl]
if (session != null) {
onPlayerReady(session)
} else {
onPlayerNotReady()
}
}
fun getPlayingSession(videoUrl: String, onPlayerReady: (MediaSession) -> Unit, onPlayerNotReady: () -> Unit, onPlayerError: () -> Unit, onPlayerIdle: () -> Unit) {
val session = playingMap[videoUrl]
if (session != null) {
onPlayerReady(session)
} else {
onPlayerNotReady()
}
}
fun getPlayingSession(videoUrl: String, onPlayerReady: (MediaSession) -> Unit, onPlayerNotReady: () -> Unit, onPlayerError: () -> Unit, onPlayerIdle: () -> Unit, onPlayerEnded: () -> Unit) {
val session = playingMap[videoUrl]
if (session != null) {
onPlayerReady(session)
} else {
onPlayerNotReady()
}
}
fun getPlayingSession(videoUrl: String, onPlayerReady: (MediaSession) -> Unit, onPlayerNotReady: () -> Unit, onPlayerError: () -> Unit, onPlayerIdle: () -> Unit, onPlayerEnded: () -> Unit, onPlayerBuffering:
from deepseek-coder.
训练的时候fim确实会随机剪开文件拼在一起,因此有时候会出现补全比较长的情况,如果是使用成补全的话,最好设置最大长度
from deepseek-coder.
嗯嗯明白,似乎没找到一种合适的配置,可以让模型补全的比较稳定~
试过了codellama的补全功能也有类似的情况。
from deepseek-coder.
我们一般使用fim的话,会用Repetition penalty为1,然后限制补全最多3行或遇到eos。如果要继续补全,就再过一次fim
from deepseek-coder.
收到,感谢回复~
from deepseek-coder.
Related Issues (20)
- 微调完的模型,如何跟基础模型合并? HOT 1
- 本地部署怎么实现vscode自动代码补全? HOT 1
- How to use fine-tuned model? HOT 3
- 使用vllm加速inference后输出容易不符合格式要求
- 使用vllm加载33b-base或33b-instruct后,使用DS-1000、Program-Aided Math Reasoning (PAL)评估集进行评估,得分很低,与论文上的数据不符
- 并发数目
- 用vllm加速推理框架 推理速度还是很慢 HOT 1
- Are EOS tokens masked during pre-training? If so, how does FIM mode know how to connect to the `text_after`?
- 训练数据切分问题 HOT 1
- 疑惑:为什么 base 模型的 tokenizer 词表中也有类似 <|Assistant|> 这样多用于 chat 模型的 special tokens?
- Deepseekcoder 6 spitting out corrupt output for code generation question
- 为什么在进行一次训练加载后,会出现找不到显卡no slot的报错呢?
- RuntimeError: CUDA error: no kernel image is available for execution on the device
- Where is DeepSeek-Coder-V2?
- Long Code Arena
- deepseek-coder-6.7b-base vuejs代码补全上存在一些问题
- 加载模型时出错
- What is the correct padding side for train/eval of base model for FIM?
- dependency parsing code and deduplication script
- Problem in Math Evaluation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepseek-coder.