anchor.diff:            state.output_.Zero()
   
             start <- Stopwatch.StartNew()
  -          tokenCount <- 0L
  +          tokenCount := 0L
             let threads = ResizeArray<Thread>()
             for i = 0 to args.thread - 1 do
               let stream = System.IO.File.Open(args.input, FileMode.Open, FileAccess.Read, FileShare.Read)
               stream.Position <- int64(i) * stream.Length / int64(args.thread)
               let src = streamToLines state.args_.model stream true
  -            let t = Thread(fun () -> x.trainThread(src,i, args.thread, verbose))
  +            let t = Thread(fun () -> FastText.trainThread(start, tokenCount, state, src,i, args.thread, verbose))
               t.Start()
               threads.Add(t)
             for it in threads do
  
positive.code:                     yield Some res
            }
  
          member x.trainThread(src, threadId : int, thread : int, verbose : int) =
  
  
            let model = Model(state.input_, state.output_, state.args_, threadId)
            if state.args_.model = model_name.sup
            then model.setTargetCounts(state.dict_.getCounts(entry_type.label).ToArray())
  
negative.code:           let mutable localTokenCount = 0
  
            let lineSrc = state.dict_.getLines(src, model.rng).GetEnumerator()
            while !tokenCount < int64(state.args_.epoch * ntokens) do
              let progress = float32(!tokenCount) / float32(state.args_.epoch * ntokens)
              let lr = state.args_.lr * (1.0f - progress)
              lineSrc.MoveNext() |> ignore
              let line, labels = lineSrc.Current
  